diff options
author | Rumia <rumia-san@outlook.com> | 2021-06-05 22:18:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-05 16:18:34 +0200 |
commit | 5edaa90d67f3da6f664c1d99d8dba778bdf3ddbe (patch) | |
tree | a404e6b56a4813d89a71e11ae05d676f21889ddb | |
parent | 14a2ada1ee1db32d2334789587b57f18fe6913b4 (diff) |
fix(dotnet): Don't treat folder with .sln file as a .NET project (#2785)
* Don't treat folder with .sln file as a .NET project
* Update docs for .NET detect_extensions changes
-rw-r--r-- | docs/config/README.md | 3 | ||||
-rw-r--r-- | src/configs/dotnet.rs | 2 | ||||
-rw-r--r-- | src/modules/dotnet.rs | 5 |
3 files changed, 3 insertions, 7 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 4330ba525..8832230c8 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -839,7 +839,6 @@ the following files are present in the current directory: - `Directory.Build.props` - `Directory.Build.targets` - `Packages.props` -- `*.sln` - `*.csproj` - `*.fsproj` - `*.xproj` @@ -863,7 +862,7 @@ when there is a csproj file in the current directory. | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | | `heuristic` | `true` | Use faster version detection to keep starship snappy. | -| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. | | `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `style` | `"bold blue"` | The style for the module. | diff --git a/src/configs/dotnet.rs b/src/configs/dotnet.rs index 78c6d8de9..e8558e39b 100644 --- a/src/configs/dotnet.rs +++ b/src/configs/dotnet.rs @@ -25,7 +25,7 @@ impl<'a> Default for DotnetConfig<'a> { style: "blue bold", heuristic: true, disabled: false, - detect_extensions: vec!["sln", "csproj", "fsproj", "xproj"], + detect_extensions: vec!["csproj", "fsproj", "xproj"], detect_files: vec![ "global.json", "project.json", diff --git a/src/modules/dotnet.rs b/src/modules/dotnet.rs index 09bee872d..3d0347882 100644 --- a/src/modules/dotnet.rs +++ b/src/modules/dotnet.rs @@ -395,10 +395,7 @@ mod tests { fn shows_latest_in_directory_with_solution() -> io::Result<()> { let workspace = create_workspace(false)?; touch_path(&workspace, "solution.sln", None)?; - expect_output( - &workspace.path(), - Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))), - ); + expect_output(&workspace.path(), None); workspace.close() } |