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

"terminal.integrated.shell.windows" in last update #123069

Closed
bonjourjoel opened this issue May 6, 2021 · 14 comments
Closed

"terminal.integrated.shell.windows" in last update #123069

bonjourjoel opened this issue May 6, 2021 · 14 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@bonjourjoel
Copy link

Hi, I wake up this morning and I can't work any more. I Spent 2 hours trying to find out what happened. It turns out there was a visual studio code auto update and the setting "terminal.integrated.shell.windows": "C:\Windows\System32\cmd.exe" was deprecated. Instead there is some sort of powershell, i am not sure.
Anyway it doesn't behave the same way and all my compile scripts don't work any more. I had to uninstall vscode and install the march version, while disabling updates for good.
I am not sure what this is about. Do you know what you did to the shell that caused so much regression on my configuration?

@elazarcoh
Copy link

elazarcoh commented May 6, 2021

Same for me. (well, in a sense)
I migrated to use the new "terminal.integrated.profiles.windows" setting, but I can't configure default shell per worksapce.
previously, I could set the shellArgs per workspace, and it was good enough.

preferably, at least for me, is the option to set the new "terminal.integrated.defaultProfile.windows" configuration per workspace, e.g.:
have the profiles configuration either at the user-level or the workspace-level (possibly overriding by name), and let me select the default profile at the workspace-level as well.

motivation:
I have different workspaces requires different terminal settings. for example:
I have a workspace that needs cmd.exe with MSVC dev script to run before the terminal starts (it set up some environment variable etc.), and I have a workspace I want to use PowerShell instead of the default cmd.

@StasPotapenko
Copy link

I've got the same issue here as well. Default terminal per workspace no longer available. All the tasks which depend on custom(default) shell, stopped working. New terminal "features" don't help.

@AlencarGabriel
Copy link

After the april update all my profiles defined at terminal.integrated.profiles.windows stopped work.
It's as if VsCode is ignoring this configuration.

@bonjourjoel
Copy link
Author

bonjourjoel commented May 6, 2021

I've tried and it doesn't work for my configuration. When you say "it's fixed", what do you mean? It behaves like before by default or i have to do something in the settings?

This is an exemple of what doesn't work:
{ "label": "compile ts app ; ~ compile ts WATCH @client", "type": "shell", "command": "node", "args": [ "app-dev-utils/bin/app-dev-utils/src/vsc-task-run/VscTaskRun.js", "~ compile ts WATCH @client", "tsc-watch --noClear -p app-src/$ver/.compilets/tsconfig-client-app.json --onCompilationComplete \\\"node app-dev-utils/bin/app-dev-utils/src/fix-imports-js/FixImportsJs.js -watch app-bin/app-bin-client app-src/$ver/.compilets\\\"", ], "problemMatcher": ["$tsc-watch"], "isBackground": true, "auto": true, },

This works with march version and doesn't with this version. It sends wrong command line arguments to my script, they are split into chunks. the command "node" is sent to my script without the arguments, or something like this.

There is a problem with command line arguments of vsc task, at least. There are maybe other issues. I don't understand this part of vscode. I selected MSDOS shell because i know msdos and I wrote my scripts for msdos and vsc with command line arguments. I don't know what doesn't work. At least the arguments are not sent correctly. I don't know powershell. It could be related to powershell or related to a regression bug of vsc tasks arguments.

Edit: Sorry i edit my message because i lost my temper :) I rewrote something cooler.

Regards

@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

but I can't configure default shell per worksapce. previously, I could set the shellArgs per workspace, and it was good enough

@elazarcoh workspace terminal settings now require "terminal.integrated.allowWorkspaceConfiguration": true to be set as a stop gap solution until we get workspace trust enabled. See #121470

@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

I'm guessing everyone is having problems with specifically workspace profiles? The new system should be much better at handling this, but there are some caveats:

  • Workspace settings don't work by default unless "terminal.integrated.allowWorkspaceConfiguration": true is set for hopefully just this version. After that they won't work in restricted workspaces which is a new security concept coming soon.
  • A workspace can no longer set the default profile, I could be convinced to allow this you really rely on the default terminal here and getting to it from here is too much hassle:
    Screen Shot 2021-05-06 at 8 22 39 AM
    Please let me know

To get the screenshot above I used:

User settings.json:

"terminal.integrated.allowWorkspaceConfiguration": true

Workspace settings.json

    "terminal.integrated.profiles.osx": {
      "My workspace shell": {
        "path": "bash",
        "icon": "terminal-bash"
      }
    }

@Tyriar Tyriar added the info-needed Issue requires more information from poster label May 6, 2021
@AlencarGabriel
Copy link

After the april update all my profiles defined at terminal.integrated.profiles.windows stopped work.
It's as if VsCode is ignoring this configuration.

I added the configuration "terminal.integrated.allowWorkspaceConfiguration": true and now my profiles have reappeared. My configurations was in the workspace too.

@Tyriar Tyriar added this to the May 2021 milestone May 6, 2021
@bonjourjoel
Copy link
Author

I don't know what is a "workspace profile". I had a normal configuration with cmd.exe shell and no settings or "profiles". The commands which are valid ms dos commands don't work anymore. The command line arguments which are a feature of "type": "shell", "command": "node", "args", they don't work. Do you know why?

@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

@bonjourjoel can you share your settings.json file? Specifically any setting with "terminal" in the key

@bonjourjoel
Copy link
Author

I have my settings in the workspace, not in settings.json. Here they are
keyja2.zip

@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

@bonjourjoel I expect setting terminal.integrated.allowWorkspaceConfiguration": true in your user settings should fix your problem too (unless you have a defaultProfile set in your user settings)

@bonjourjoel
Copy link
Author

Yes thanks, it seems to work. I ran a few tests and if I understand correctly, this allowWorkspaceConfiguration makes the deprecated value of terminal.integrated.profiles.windows used like before?
It says that I should use #terminal.integrated.defaultProfile.windows# instead. But how? There is no documentation that I can see about the possible values. And can it do the same thing ? To use cmd.exe instead of powershell for the terminal? If so how?

@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

@bonjourjoel sorry, docs coming soon microsoft/vscode-docs#4526.

Because of these reports, I'm going to swap the priority of defaultProfile and shell/shellArgs such that if shell or shellArgs is specified, that will take precedence over the profile system. Then switch it several months later: #123159. Note that this will not change the need for terminal.integrated.allowWorkspaceConfiguration which will is still expected to be going away in the following stable release.

@bonjourjoel
Copy link
Author

Please put in the doc how to use cmd.exe as vsc's shell. Thanks.

@Tyriar Tyriar added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels May 27, 2021
@Tyriar Tyriar removed this from the May 2021 milestone May 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2021
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)
Projects
None yet
Development

No branches or pull requests

6 participants