feat: add ability to set global properties
Not all properties can be set globally, and the "appName" in the global case is currently defaulted to `--global`. This is okay because domain label names cannot start with hyphens, and all app names must be valid domain label names.
This commit is contained in:
@@ -12,9 +12,14 @@ import (
|
||||
)
|
||||
|
||||
// CommandPropertySet is a generic function that will set a property for a given plugin/app combination
|
||||
func CommandPropertySet(pluginName, appName, property, value string, properties map[string]string) {
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
LogFail(err.Error())
|
||||
func CommandPropertySet(pluginName, appName, property, value string, properties map[string]string, globalProperties map[string]bool) {
|
||||
if appName != "--global" {
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
LogFail(err.Error())
|
||||
}
|
||||
}
|
||||
if !globalProperties[property] {
|
||||
LogFail("Property cannot be specified globally")
|
||||
}
|
||||
if property == "" {
|
||||
LogFail("No property specified")
|
||||
|
||||
Reference in New Issue
Block a user