Skip to content

Commit

Permalink
new: Fix global bin detection on windows. (#77)
Browse files Browse the repository at this point in the history
* vscode extension: Find globalPath on windows

Update version to 0.13.1

issue #1673

* Correct lint error

* Fix Formatting error
  • Loading branch information
sharpepd authored Oct 7, 2024
1 parent 9582d9c commit d03a78c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "0.13.0",
"version": "0.13.1",
"name": "moon-console",
"publisher": "moonrepo",
"displayName": "moon console",
Expand Down
7 changes: 6 additions & 1 deletion packages/vscode-extension/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ export class Workspace {
}

try {
const globalBin = execa.sync('which', ['moon']).stdout;
let globalBin = '';
if (process.platform === 'win32') {
globalBin = execa.sync('cmd', ['/c', 'where', 'moon']).stdout;
} else {
globalBin = execa.sync('which', ['moon']).stdout;
}

if (globalBin && fs.existsSync(globalBin)) {
return globalBin;
Expand Down

0 comments on commit d03a78c

Please sign in to comment.