Skip to content

Commit ab455f8

Browse files
fix: change default binary on windows
1 parent 876f10a commit ab455f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/extension/common.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import { Unport } from 'unport'
33
import { workspace } from 'vscode'
44
import type { ChildProcessWithoutNullStreams } from 'node:child_process'
55

6+
const defaultBinary = process.platform === 'win32' ? 'ast-grep.exe' : 'ast-grep'
7+
68
export function resolveBinary() {
7-
return workspace.getConfiguration('astGrep').get('serverPath', 'ast-grep')
9+
return workspace.getConfiguration('astGrep').get('serverPath', defaultBinary)
810
}
911

1012
export const parentPort: ParentPort = new Unport()

0 commit comments

Comments
 (0)