Skip to content

Commit bd5d34e

Browse files
committed
fix: use VSCODE_CWD to autodetect if in editor
1 parent 229e799 commit bd5d34e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/env.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import process from 'node:process'
22
import { isPackageExists } from 'local-pkg'
33

44
export const isInEditor = !!(
5-
(process.env.VSCODE_PID || process.env.JETBRAINS_IDE || process.env.VIM) &&
5+
(process.env.VSCODE_PID ||
6+
process.env.VSCODE_CWD ||
7+
process.env.JETBRAINS_IDE ||
8+
process.env.VIM) &&
69
!process.env.CI
710
)
811
export const hasTypeScript = isPackageExists('typescript')

0 commit comments

Comments
 (0)