mirror of https://github.com/databricks/cli.git
Make sure list of managers is deterministic
This commit is contained in:
parent
c850cfbecd
commit
763bcd5aad
|
@ -3,6 +3,7 @@ package permissions
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/databricks/cli/bundle"
|
"github.com/databricks/cli/bundle"
|
||||||
|
@ -87,9 +88,11 @@ func analyzeBundlePermissions(b *bundle.Bundle) (bool, string) {
|
||||||
|
|
||||||
assistance := "For assistance, contact the owners of this project."
|
assistance := "For assistance, contact the owners of this project."
|
||||||
if otherManagers.Size() > 0 {
|
if otherManagers.Size() > 0 {
|
||||||
|
list := otherManagers.Values()
|
||||||
|
sort.Strings(list)
|
||||||
assistance = fmt.Sprintf(
|
assistance = fmt.Sprintf(
|
||||||
"For assistance, users or groups with appropriate permissions may include: %s.",
|
"For assistance, users or groups with appropriate permissions may include: %s.",
|
||||||
strings.Join(otherManagers.Values(), ", "),
|
strings.Join(list, ", "),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return canManageBundle, assistance
|
return canManageBundle, assistance
|
||||||
|
|
Loading…
Reference in New Issue