Skip to content

Commit

Permalink
vscode extension: Find globalPath on windows
Browse files Browse the repository at this point in the history
Update version to 0.13.1

issue #1673
  • Loading branch information
sharpepd committed Oct 5, 2024
1 parent 9582d9c commit fa26bd0
Show file tree
Hide file tree
Showing 2 changed files with 8 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
8 changes: 7 additions & 1 deletion packages/vscode-extension/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,13 @@ 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 fa26bd0

Please sign in to comment.