Allow set-credential-library when a single library id is provided. (#1363)
This commit is contained in:
1 parent
f483828286
commit
13a65052b4
1 file changed
+4
-8
@@ -328,14 +328,10 @@ func extraFlagsHandlingFuncImpl(c *Command, _ *base.FlagSets, opts *[]targets.Op
|
||||
c.UI.Error("No credential-libraries supplied via -application-credential-library")
|
||||
return false
|
||||
}
|
||||
switch len(c.flagApplicationCredentialLibraries) {
|
||||
case 0:
|
||||
case 1:
|
||||
if c.flagApplicationCredentialLibraries[0] == "null" {
|
||||
*opts = append(*opts, targets.DefaultApplicationCredentialLibraryIds())
|
||||
}
|
||||
default:
|
||||
*opts = append(*opts, targets.WithApplicationCredentialLibraryIds(c.flagApplicationCredentialLibraries))
|
||||
*opts = append(*opts, targets.WithApplicationCredentialLibraryIds(c.flagApplicationCredentialLibraries))
|
||||
if len(c.flagApplicationCredentialLibraries) == 1 && c.flagApplicationCredentialLibraries[0] == "null" {
|
||||
// Clear all library ids since the only value set is a null.
|
||||
*opts = append(*opts, targets.DefaultApplicationCredentialLibraryIds())
|
||||
}
|
||||
|
||||
case "authorize-session":
|
||||
|
||||
Reference in new issue
Block a user