Vscode-code-runner: fileDirectoryAsCwd have no effect on terminal

Created on 22 Jul 2017  ·  2Comments  ·  Source: formulahendry/vscode-code-runner

  • OS: Windows 10 x64 (1607)
  • vscode: 1.14.2
  • code runner: 0.6.27

config:

{
    "code-runner.executorMap": {
        "c": "gcc -std=c99 -Wall $fileName -o $fileNameWithoutExt && $fileNameWithoutExt",
        "cpp": "g++ -std=c++11 $fileName -o $fileNameWithoutExt && $fileNameWithoutExt",
    },
    "code-runner.saveFileBeforeRun": true,
    "code-runner.fileDirectoryAsCwd": true,
    "code-runner.runInTerminal": false,
    "code-runner.preserveFocus": true,
    "code-runner.showExecutionMessage": true,
    "code-runner.clearPreviousOutput": true,
    "code-runner.showRunIconInEditorTitleMenu": false,

    "terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe"
}

I find it fails to change CWD when I switch "code-runner.runInTerminal" to true (I type C: in terminal window in advance):

works well in Output | fails in Terminal
-------- | --------
|

And I do not prefer to do some tricks in "code-runner.executorMap" (e.g. cd /d $dir && ...) 'cause it seems a bit messy, can you make some changes in terminal such as cd /path/to/file before running the code while "code-runner.fileDirectoryAsCwd" is set to be "true"? Thanks a lot ! :stuck_out_tongue:

enhancement

Most helpful comment

@michaelHL Please try the latest version.

All 2 comments

@michaelHL Please try the latest version.

@formulahendry Nice Shot! Thx!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rana picture rana  ·  5Comments

emadb picture emadb  ·  5Comments

ElektroStudios picture ElektroStudios  ·  4Comments

eegod picture eegod  ·  5Comments

Kelo007 picture Kelo007  ·  3Comments