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

dotnet/c# build task uses nushell when set as default #189

Open
atakiya opened this issue Jan 25, 2025 · 3 comments
Open

dotnet/c# build task uses nushell when set as default #189

atakiya opened this issue Jan 25, 2025 · 3 comments

Comments

@atakiya
Copy link

atakiya commented Jan 25, 2025

Hello, I'm not sure which extension is at fault exactly here, however, so far I can only reproduce this with the vscode-nushell-lang extension and it's included Nushell profile, no other.

Environment setup:

// settings.json
{
  "terminal.integrated.defaultProfile.windows": "Nushell",
  "terminal.integrated.automationProfile.windows": {
    "path": "C:/WINDOWS/System32/cmd.exe"
  },
}

Ways to reproduce / Problem description

Attempting to F5 / Run/Debug any C# project, such as the .NET9 "Hello World" consoleApp template will attempt to build it before launching the debugger.

With the default shell set to the included Nushell profile, the build task invoked will launch the last used terminal shell in interactive mode, which breaks the build process.

Any other profile will not change the build shell in that situation, which makes me believe that this might be an issue on this extension.

Creating a custom Nushell profile also does fix the issue, which I currently use as a workaround, such as below.

// settings.json
{
  "terminal.integrated.profiles.windows": {
    "Nushell-custom": {
      "path": "nu",
      "icon": "terminal"
    }
  },
}
@fdncred
Copy link
Contributor

fdncred commented Jan 25, 2025

I'm not following what the problem is. Maybe you're saying that nushell shouldn't be used as a build task even when it's set as the default?

@atakiya
Copy link
Author

atakiya commented Jan 26, 2025

I'm not following what the problem is. Maybe you're saying that nushell shouldn't be used as a build task even when it's set as the default?

Yes, vscode should not use the default shell for automation tasks, which is the entire point of the automationProfile setting.
This extension breaks that with the bundled shell profile.

Edit:
This isn't even about it using it as default, it just completely breaks the task shell, any execution calls aren't even forwarded, the shell just sits idly there.
No matter what other profile one sets, even a custom nushell profile as in my original post, works, it's only the profile bundled with the extension that does this.

@fdncred
Copy link
Contributor

fdncred commented Jan 26, 2025

ok. I'd accept a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants