diff --git a/artifactory/commands/packagemanagerlogin/packagemanagerlogin_test.go b/artifactory/commands/packagemanagerlogin/packagemanagerlogin_test.go index 232dc9f8c..681f0d522 100644 --- a/artifactory/commands/packagemanagerlogin/packagemanagerlogin_test.go +++ b/artifactory/commands/packagemanagerlogin/packagemanagerlogin_test.go @@ -341,11 +341,12 @@ func testBuildToolLoginCommandConfigureDotnetNuget(t *testing.T, packageManager homeDir, err := os.UserHomeDir() assert.NoError(t, err) var nugetConfigDir string - if io.IsWindows() { + switch { + case io.IsWindows(): nugetConfigDir = "AppData" - } else if packageManager == project.Nuget { + case packageManager == project.Nuget: nugetConfigDir = ".config" - } else if packageManager == project.Dotnet { + case packageManager == project.Dotnet: nugetConfigDir = ".nuget" } nugetConfigFilePath := filepath.Join(homeDir, nugetConfigDir, "NuGet", "NuGet.config")