Skip to content

Specify paths and shell on Windows#55694

Merged
davidwengier merged 3 commits intodotnet:mainfrom
davidwengier:UseCmdOnWindows
Aug 20, 2021
Merged

Specify paths and shell on Windows#55694
davidwengier merged 3 commits intodotnet:mainfrom
davidwengier:UseCmdOnWindows

Conversation

@davidwengier
Copy link
Copy Markdown
Member

My default terminal in VS Code is bash, but I'm on Windows so VS Code uses windows slashes, and generally results in pain. These changes fix things by forcing cmd.exe usage on Windows, and specifying the absolute path of some commands.

Would love someone to validate that I haven't broken anything, especially on non-Windows (@333fred)

@davidwengier davidwengier requested review from a team and 333fred August 18, 2021 10:30
@ghost ghost added the Area-Infrastructure label Aug 18, 2021
Copy link
Copy Markdown
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

I'll try to check this out and test later today.

Comment thread .vscode/tasks.json
"type": "shell",
"windows": {
"command": "./build.cmd"
"command": "${workspaceFolder}/build.cmd"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why the differences between workspaceFolder and workspaceRoot?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Whoops. The inconsistency was just that this was done in two parts, over two days, on two machines, and I picked a different thing to copy and paste each time it seems.

Great catch on the workspaceRoot being deprecated though, I'll update all of the existing uses too.

Comment thread .vscode/tasks.json
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"windows": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does this actually control? Does it control what terminal is used when I hit ctrl+` on Windows? Or just what shell these tasks run in?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just what shell is used to run tasks in.

@davidwengier davidwengier merged commit d41ee93 into dotnet:main Aug 20, 2021
@davidwengier davidwengier deleted the UseCmdOnWindows branch August 20, 2021 06:51
@ghost ghost added this to the Next milestone Aug 20, 2021
@dibarbet dibarbet modified the milestones: Next, 17.0.P4 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants