Closed Butanium closed 2 years ago
@Butanium can you share any terminal
and task
related settings you have set?
@alexr00 I can't remember which settings I changed, if any, can I send you my whole settings.json or screenshots of terminal and tasks settings ?
Yes, the whole settings.json
would be useful.
The one inside my .vscode project folder is just :
{
"ocaml.sandbox": {
"kind": "global"
},
"python.formatting.provider": "black",
"discord.enabled": true
}
The global one in C:\Users\Clement\AppData\Roaming\Code\User\settings.json
:
{
"workbench.colorTheme": "Default Dark+",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"ocaml_terminal": {
"path": "C:\\WINDOWS\\System32\\cmd.exe",
"args": []
}
},
"files.autoSave": "onFocusChange",
"files.autoGuessEncoding": true,
"timeline.excludeSources": [],
"git.confirmSync": false,
"tabnine.experimentalAutoImports": true,
"git.enableSmartCommit": true,
"diffEditor.ignoreTrimWhitespace": false,
"files.watcherExclude": {
"**/_build/**": true,
"**/archive/**": true,
"**/puzzle_input/**": true
},
"search.exclude": {
"**/_build/**": true,
"**/archive/**": true,
"**/logs/**": true
},
"files.eol": "\n",
"gitlens.defaultTimeFormat": null,
"gitlens.hovers.currentLine.over": "line",
"update.mode": "manual"
}
Let me know if I can provide you more info
It looks like when you run the script manually you're using cmd.exe. However, unless you specify a different shell, tasks will use your default shell (in this case powershell). Can you try adding this setting to change the shell that tasks uses?
"terminal.integrated.automationProfile.windows": {
"path": "cmd.exe",
},
I just tried to run manually my script in powershell and it works,
PS C:\Users\Clement\Documents\prepa\tipe\ocaml-tsp> external_tools/show_data/show_task.py
logs\MCTS-att48-1800s-Random-Min_spanning_tree-Two_opt_optimization_200len_100iter_1s--1\all_scores.csv 1000
but opens an external python console
I added the parameters you sent in both settings.json
but it seems like the task still execute in a Powershell console :
I also tried to replace your path by "path":"${env:windir}\\Sysnative\\cmd.exe"
and "${env:windir}\\System32\\cmd.exe"
but got the same result
Do you also have settings in a *.code-workspace file?
Opens this settings.json :
{
"ocaml.sandbox": {
"kind": "global"
},
"python.formatting.provider": "black",
"discord.enabled": true
}
And I have no *.code-workspace file on my computer (I made a search of any file with code-workspace
extension)
@Butanium it looks like you're running your tasks as a process
task. Your task should work if you add the property "type": "shell"
to it. I missed this in the original post.
I had to enter the entire path instead of the relative one but it works now. Thanks !
Issue Type: Bug
I have this task
decimate and plot csv
executing a python script plotting the csv I'm editing, and several others which executs cmd asdune utop
:The dune task works well but the python one just doesn't :
However when I copy paste the task in a vscode cmd, it works well :
By the way this is the python script called :
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:40:02.816Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 2304)| |GPU Status|2d_canvas: enabledgpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|7.80GB (0.97GB free)| |Process Argv|--crash-reporter-id 8a98e7f6-95cb-41bb-86c4-651ceca005df| |Screen Reader|no| |VM|0%|
Extensions (1)
Extension|Author (truncated)|Version ---|---|--- vscode-language-pack-fr|MS-|1.63.3A/B Experiments
``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392cf:30425750 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30428979 pythonvs932:30410667 vscop804cf:30404767 vscop341:30404997 vsrem710:30416614 vsbas813:30426126 ```