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

How to configure VS Code on Windows to run a task in WSL? #16797

Closed
daldr-ntml opened this issue Dec 7, 2016 · 5 comments
Closed

How to configure VS Code on Windows to run a task in WSL? #16797

daldr-ntml opened this issue Dec 7, 2016 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues

Comments

@daldr-ntml
Copy link

  • VSCode Version: 1.7.2
  • OS Version: Windows 10 Pro 1607

I want to run a task in WSL to run 'make', so I defined the task as:

{
    "version": "0.1.0",
    "command": "c:/Windows/sysnative/bash.exe",
    "isShellCommand": true,
    "args": ["-c 'cd /mnt/c/myproj/trunk/software/Source/; make'"],
    "showOutput": "always"
}

when I run it I see:

error 0x80070057

interspersed with '?' characters in the output window.

What is wrong with my task definition?

@dbaeumer
Copy link
Member

dbaeumer commented Dec 7, 2016

Actually I haven't found a way yet to make this work.

Dups: #6579

@dbaeumer dbaeumer added tasks Task system issues *duplicate Issue identified as a duplicate of another issue(s) labels Dec 7, 2016
@networkfusion
Copy link

networkfusion commented Dec 13, 2016

I am also getting this when calling an external batch file that is then calling bash, e.g.:

@echo off
set "SystemPath=%SystemRoot%\\System32"
IF EXIST %WINDIR%\\sysnative\\reg.exe (
  set "SystemPath=%SystemRoot%\Sysnative"
  echo. "32-bit process..."
)

set env="/usr/local/libdragon"

IF %1.==. (
  echo. "no parameter"
  %SystemPath%\\bash --verbose -c "export N64_INST=%env%; make"
) ELSE (
  echo. "parameter: %1"
  %SystemPath%\\bash --verbose -c "export N64_INST=%env%; make %1"
)
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "command": "build",
    "isShellCommand": true,
    "args": [],
    "showOutput": "always",
    "echoCommand": true,
    "suppressTaskName": true,
    "tasks": [
        { 
            "taskName": "Release",
            "args": []
        },
        { 
            "taskName": "Debug",
            "args": ["debug"]
        },
        { 
            "taskName": "Clean",
            "args": ["clean"]
        }
    ]
}

However if I call the batch script from the integrated terminal it runs correctly!

from a quick search on google, error 0x80070057 is caused by using legacy console... Is VS code using a legacy console for tasks?!

@dbaeumer
Copy link
Member

Closing as dup.

@daldr-ntml
Copy link
Author

Which is the duplicate issue?

@dbaeumer
Copy link
Member

#6579

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues
Projects
None yet
Development

No branches or pull requests

3 participants