dotnet / dotnet/sdk

`dotnetup install --default` rejects uppercase `SYSTEM` despite documentation

Open
#54,542 1 comment 0 reactions 0 assignees View on GitHub
Area-dotnetup untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Prerequisites

- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3Adotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).

### Issue type

Bug report

### Description

## Description

`dotnetup install --default SYSTEM` fails with a parse error even though the help text / documentation shows `SYSTEM` as a valid value. Only the lowercase `system` form is accepted.

## Steps to Reproduce

```powershell
dotnetup install --default SYSTEM
# Error: value 'SYSTEM' is not valid for --default
```

## Expected Behavior

The `--default` option should accept values case-insensitively (e.g. `SYSTEM`, `System`, `system` should all work).

## Actual Behavior

Only the exact lowercase `system` is accepted. Any other casing is rejected by the parser.

## Suggested Fix

Use a case-insensitive comparison when parsing the `--default` option values, or configure the `System.CommandLine` option to accept values case-insensitively.

### dotnetup version

_No response_

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.