Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Failed to resolve the Node executable path when it contains spaces#363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 1 commit intomasterfromcs/issue-362
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -127,7 +127,7 @@
| **(Deprecated)** `leetcode.enableShortcuts` | Specify whether the submit and test shortcuts in editor or not. | `true` |
| `leetcode.editor.shortcuts` | Specify the customized shorcuts in editors. Supported values are: `submit`, `test`, `solution` and `description`. | `["submit, test"]` |
| `leetcode.enableSideMode` | Specify whether `preview`, `solution` and `submission` tab should be grouped into the second editor column when solving a problem. | `true` |
| `leetcode.nodePath` | Specify the `Node.js` executable path. | `node` |
| `leetcode.nodePath` | Specify the `Node.js` executable path.for example, C:\Program Files\nodejs\node.exe | `node` |

## Want Help?

Expand Down
2 changes: 1 addition & 1 deletiondocs/README_zh-CN.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -127,7 +127,7 @@
| **(Deprecated)** `leetcode.enableShortcuts` | 指定是否在 VS Code 编辑文件下方显示提交和测试的快捷按钮。 | `true` |
| `leetcode.editor.shortcuts` | 指定在编辑器内所自定义的快捷方式。可用的快捷方式有: `submit`, `test`, `solution`, `description`。 | `["submit, test"]` |
| `leetcode.enableSideMode` | 指定在解决一道题时,是否将`问题预览`、`高票答案`与`提交结果`窗口集中在编辑器的第二栏。 | `true` |
| `leetcode.nodePath` | 指定 `Node.js` 可执行文件的路径。 | `node` |
| `leetcode.nodePath` | 指定 `Node.js` 可执行文件的路径。如:C:\Program Files\nodejs\node.exe | `node` |

## 需要帮助?
在遇到任何问题时,可以先查看一下[疑难解答](https://github.com/jdneo/vscode-leetcode/wiki/%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94)以及[常见问题](https://github.com/jdneo/vscode-leetcode/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)寻求帮助。
Expand Down
2 changes: 1 addition & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -361,7 +361,7 @@
"type": "string",
"default": "node",
"scope": "application",
"description": "The Node.js executable path."
"description": "The Node.js executable path. for example, C:\\Program Files\\nodejs\\node.exe"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletionssrc/leetCodeExecutor.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,8 @@ class LeetCodeExecutor implements Disposable {
if (!await fse.pathExists(this.nodeExecutable)) {
throw new Error(`The Node.js executable does not exist on path ${this.nodeExecutable}`);
}
// Wrap the executable with "" to avoid space issue in the path.
this.nodeExecutable = `"${this.nodeExecutable}"`;
if (useWsl()) {
this.nodeExecutable = await toWslPath(this.nodeExecutable);
}
Expand Down
5 changes: 4 additions & 1 deletionsrc/utils/workspaceUtils.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,10 @@ export async function getActiveFilePath(uri?: vscode.Uri): Promise<string | unde

function isSubFolder(from: string, to: string): boolean {
const relative: string = path.relative(from, to);
return !!relative && !relative.startsWith("..") && !path.isAbsolute(relative);
if (relative === "") {
return true;
}
return !relative.startsWith("..") && !path.isAbsolute(relative);
}

enum OpenOption {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp