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

Task ${relativeFile} slash style #40256

Closed
purocean opened this issue Dec 15, 2017 · 12 comments
Closed

Task ${relativeFile} slash style #40256

purocean opened this issue Dec 15, 2017 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@purocean
Copy link

  • VSCode Version: 1.19
  • OS Version: Windows 10

Steps to Reproduce:

VSCode 1.18

${relativeFile} is Linux Style like a/b/c

VSCode 1.19

${relativeFile} is Windows Style like a\b\c

So when I run some task in WSL,Windows style slash will wrong。

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the tasks Task system issues label Dec 15, 2017
@dbaeumer
Copy link
Member

This is a more general issue since WSL needs to be treated as a Linux environment but VS Code thinks is is running under Windows and correctly uses \

@dbaeumer dbaeumer added the WSL Issue when using WSL label Dec 15, 2017
@dbaeumer dbaeumer added this to the Backlog milestone Dec 15, 2017
@purocean
Copy link
Author

@dbaeumer Variable support replace sub string ${relativeFile/a/b/} replace a to b in Sublime Text,I want this feature in VSCode.

@dbaeumer
Copy link
Member

Nice idea. Can you please open a separate issue for this.

@weinand
Copy link
Contributor

weinand commented Dec 18, 2017

@bpasero changed the behaviour of ${relativeFile} with this commit:
4a8327a

The change was good because it fixed the problem that ${relativeFile} was using forward slashes on Windows.

However this broke the WSL use case (which only worked by accident before).
In general, VS Code variables are resolved on the Windows side. So they all should use backward slashes.

@weinand weinand assigned bpasero and unassigned dbaeumer Dec 18, 2017
@weinand weinand removed tasks Task system issues WSL Issue when using WSL labels Dec 18, 2017
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Dec 18, 2017
@bpasero bpasero closed this as completed Dec 18, 2017
@bpasero
Copy link
Member

bpasero commented Dec 18, 2017

fixed via 313a21d for 1.19 recovery

@dbaeumer or @weinand please verify 👍

@dbaeumer
Copy link
Member

@bpasero @weinand what will be the path forward. Using slash under Windows can cause problems when used in tasks. So IMI we should use \ and break this. But we should announce this.

@weinand
Copy link
Contributor

weinand commented Dec 18, 2017

@dbaeumer yes, I fully agree: environment variables should always use the correct OS path separators. ${relativeFile} was always violating this rule.
So for VS Code 1.20 we should announce that ${relativeFile} will be consistent with all the other path variables (but will break some tasks or launch configs).

@dbaeumer
Copy link
Member

Would be cool to get #40288 for 1.20. Then a user has a nice way of controlling this. @isidorn any concerns ?

@bpasero
Copy link
Member

bpasero commented Dec 18, 2017

My intent was to restore the previous (broken) way it was, not to fix the underlying issue.

@weinand
Copy link
Contributor

weinand commented Dec 18, 2017

Yes, we understand this. @dbaeumer was asking for "the path forward". And I think we have a story for that now.

In general I like #40288. But we'll have to coordinate this with some other requests for variables: #38381, #38327, #38977

@bpasero
Copy link
Member

bpasero commented Dec 18, 2017

Sounds good 👍

@weinand weinand added the verified Verification succeeded label Dec 18, 2017
@weinand
Copy link
Contributor

weinand commented Dec 18, 2017

verified on all platforms: ${relativeFile} uses forward slashes on all OSes

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants