You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmdletPassedIn.WriteDebug($"Credential provider path is '{credProviderPath}'");
140
147
if(string.IsNullOrEmpty(credProviderPath))
141
148
{
142
149
cmdletPassedIn.WriteError(newErrorRecord(
143
150
newArgumentNullException("Path to the Azure Artifacts Credential Provider is null or empty. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery to set up the Credential Provider."),
144
151
"CredentialProviderPathIsNullOrEmpty",
145
152
ErrorCategory.InvalidArgument,
146
-
null));
153
+
credProviderPath));
147
154
returnnull;
148
155
}
149
156
150
-
// Check case sensitivity here
151
157
if(!File.Exists(credProviderPath))
152
158
{
153
-
cmdletPassedIn.WriteError(newErrorRecord(
154
-
newFileNotFoundException($"Path found '{credProviderPath}' is not a valid Azure Artifact Credential Provider executable. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery to set up the Credential Provider."),
155
-
"CredentialProviderFileNotFound",
156
-
ErrorCategory.ObjectNotFound,
157
-
null));
158
-
returnnull;
159
+
// If the Credential Provider is not found on a Unix machine, try looking for a case insensitive file.
newFileNotFoundException($"Path found '{credProviderPath}' is not a valid Azure Artifact Credential Provider executable. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery to set up the Credential Provider."),
172
+
"CredentialProviderFileNotFound",
173
+
ErrorCategory.ObjectNotFound,
174
+
credProviderPath));
175
+
}
176
+
}
177
+
else
178
+
{
179
+
cmdletPassedIn.WriteError(newErrorRecord(
180
+
newFileNotFoundException($"Path found '{credProviderPath}' is not a valid Azure Artifact Credential Provider executable. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery to set up the Credential Provider."),
181
+
"CredentialProviderFileNotFound",
182
+
ErrorCategory.ObjectNotFound,
183
+
credProviderPath));
184
+
185
+
returnnull;
186
+
}
159
187
}
160
188
161
189
cmdletPassedIn.WriteVerbose($"Credential Provider path found at: '{credProviderPath}'");
newArgumentNullException("Credential Provider username is null or empty. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery for more info."),
newArgumentNullException("Credential Provider password is null or empty. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery for more info."),
newException("Error retrieving credentials from Credential Provider. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery for more info.",e),
0 commit comments