Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set correct cwd for WSL #1689

Merged
merged 2 commits into from
Dec 9, 2023

Conversation

xiyaowong
Copy link
Collaborator

Close #520

@xiyaowong xiyaowong merged commit 240e8f9 into vscode-neovim:master Dec 9, 2023
8 checks passed
@xiyaowong xiyaowong deleted the fix/cwd-for-wsl branch December 9, 2023 13:43
args.push("-c", `cd ${cwd}`);
const cwd = workspaceFolder?.length ? workspaceFolder[0].uri.fsPath : undefined;
if (cwd && !vscode.env.remoteName) {
args.push("-c", `cd ${config.useWsl ? wslpath(cwd) : cwd}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cd is somewhat clumsy, should we pass cwd to spawn()? https://nodejs.org/api/child_process.html#child_processspawncommand-args-options

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, I realized this after the merger. Too lazy to make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working directory not set correctly with WSL installation
3 participants