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

Path Variables uses the platform slashes instead of always forward slashes #70926

Closed
pbricout opened this issue Mar 21, 2019 · 3 comments
Closed
Assignees
Labels
terminal Integrated terminal issues

Comments

@pbricout
Copy link

pbricout commented Mar 21, 2019

Issue Type: Bug

On Windows path variables like ${relativeFile} or ${workspaceFolder} are return in the platform format. I.E. using backslashes instead of forward slashes, this seems to be recent regression from this issue:
#40256
According to this issue forward slashes should be used on all OSes.
Doing this on windows, when the shell is bash is failing:

        "tasks": [{
            "label": "echo",
            "type": "shell",
            "command": "echo ${workspaceFolder}",
            "problemMatcher": []
        }]

Will show abc instead of a/b/c.
My bash scripts are not working any more.
Is there a setting to control the behaviour? I could not find one.

Doing this work as the path is in the platform format:

    "tasks": [
        {
            "label": "echo",
            "type": "process",
            "command": "cmd.exe",
            "args": [
                "/C",
                "echo",
                "${workspaceFolder}"
            ],
            "problemMatcher": []
        },

Trying to find if there is a solution, the following discussion suggest that there should be a command to specify whether to replace slashes or not, but I could not find such a thing:
#37438

VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 6.1.7601

System Info
Item Value
CPUs Genuine Intel(R) CPU 0 @ 2.30GHz (4 x 2307)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_off
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 7.97GB (0.15GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (14)
Extension Author (truncated) Version
overtype ada 0.2.0
Bookmarks ale 10.3.0
githistory don 0.4.6
code-runner for 0.9.7
vscode-auto-open-markdown-preview hnw 0.0.4
launcher ili 0.0.4
autoconf mae 0.0.7
python ms- 2019.2.5558
cpptools ms- 0.22.0
partial-diff ryu 1.4.0
vscode-hexdump sle 1.7.2
m68k ste 0.0.1
code-spell-checker str 1.6.10
acmecrossassembler Ton 0.0.18
@vscodebot vscodebot bot added the terminal Integrated terminal issues label Mar 21, 2019
@isidorn
Copy link
Contributor

isidorn commented Mar 22, 2019

As designed, more details here #70050 (comment)

@pbricout
Copy link
Author

This solution can't work in my case, see my comments in the other issue:
#70050 (comment)

@pbricout
Copy link
Author

Found a clean solution to my problem, see my comment here:
#70050 (comment)

@vscodebot vscodebot bot locked and limited conversation to collaborators May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

3 participants