dotnet / dotnet/sdk

dotnet completions script --help crashes

Open
#51,890 1 comment 1 reaction 1 assignee Claimed by @baronfel View on GitHub
untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug
Running
```
dotnet completions script --help
```
produces this error message:
```
System.InvalidOperationException: The shell application 'zsh' is not supported. The following shells are supported by this application: bash, pwsh, fish, zsh, nushell
at System.CommandLine.StaticCompletions.CompletionsCommand.<.ctor>g__LookupShellFromEnvironment|2_0(Dictionary`2 shellMap)
at System.CommandLine.Argument`1.GetDefaultValue(ArgumentResult argumentResult)
at System.CommandLine.Parsing.ArgumentResult.ValidateAndConvert(Boolean useValidators)
at System.CommandLine.Parsing.CommandResult.ValidateArgumentsAndAddDefaultResults(Boolean completeValidation)
at System.CommandLine.Parsing.ParseOperation.ValidateAndAddDefaultResults()
at System.CommandLine.Parsing.ParseOperation.Parse()
at System.CommandLine.Parsing.CommandLineParser.Parse(Command command, IReadOnlyList`1 arguments, String rawInput, ParserConfiguration configuration)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
```
and exits with the error code `1`.

### To Reproduce

install dotnet 10 and run
```
dotnet completions script --help
```

### Exceptions (if any)

```
System.InvalidOperationException: The shell application 'zsh' is not supported. The following shells are supported by this application: bash, pwsh, fish, zsh, nushell
at System.CommandLine.StaticCompletions.CompletionsCommand.<.ctor>g__LookupShellFromEnvironment|2_0(Dictionary`2 shellMap)
at System.CommandLine.Argument`1.GetDefaultValue(ArgumentResult argumentResult)
at System.CommandLine.Parsing.ArgumentResult.ValidateAndConvert(Boolean useValidators)
at System.CommandLine.Parsing.CommandResult.ValidateArgumentsAndAddDefaultResults(Boolean completeValidation)
at System.CommandLine.Parsing.ParseOperation.ValidateAndAddDefaultResults()
at System.CommandLine.Parsing.ParseOperation.Parse()
at System.CommandLine.Parsing.CommandLineParser.Parse(Command command, IReadOnlyList`1 arguments, String rawInput, ParserConfiguration configuration)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
```

### Further technical details
details of dotnet --info

.NET SDK:
Version: 10.0.100
Commit: b0f34d51fc
Workload version: 10.0.100-manifests.4c0ca8ba
MSBuild version: 18.0.2+b0f34d51f

Runtime Environment:
OS Name: debian
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/10.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.0
Architecture: x64
Commit: b0f34d51fc

.NET SDKs installed:
7.0.410 [/usr/share/dotnet/sdk]
8.0.416 [/usr/share/dotnet/sdk]
9.0.308 [/usr/share/dotnet/sdk]
10.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.22 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.11 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.22 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.11 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_CLI_TELEMETRY_OPTOUT [1]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

os: debian sid
cpu: x86-64
dotnet --version: 10.0.100

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.