`dotnet tool install` `--source` option does not work
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Environment
dotnet sdk version: 10.0.100-rtm.25507.103
### Description
When running `dotnet tool install` with a `--source` argument, the command still installs the tool from a feed defined in a nearby `nuget.config` file instead of using the specified source.
It appears that the local configuration file takes precedence over the `--source` parameter, making the `--source` option ineffective.
### To Reproduce
1. Create the following directory structure:
```
root/
├── test/
│ ├── nuget.config
```
2. Add the following `nuget.config` file under the `test` folder:
```xml
```
3. In the `test` folder, run:
```bash
dotnet tool install Cake.Tool --source https://api.nuget.org/v3/index.json
```
4. Observe that the tool is still installed from the local feed instead of NuGet.org.
### Expected behavior
The `--source` option should override any sources defined in a local `nuget.config` file and use only the explicitly specified source.
### Actual behavior
Even when `--source` is specified, `dotnet tool install` continues to use the source defined in the nearest `nuget.config` file.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.