fix: correctly split flags
This commit is contained in:
@@ -105,18 +105,18 @@ func GetSpecifiedDockerOptionsForPhase(appName string, phase string, desiredOpti
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
parts := strings.SplitN(option, " ", 2)
|
|
||||||
if len(parts) != 2 {
|
|
||||||
common.LogWarn(fmt.Sprintf("Invalid docker option found for %s: %s", appName, option))
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// match options that are in the format "--option=value"
|
// match options that are in the format "--option=value"
|
||||||
if strings.HasPrefix(option, fmt.Sprintf("%s=", desiredOption)) {
|
if strings.HasPrefix(option, fmt.Sprintf("%s=", desiredOption)) {
|
||||||
if _, ok := foundOptions[desiredOption]; !ok {
|
if _, ok := foundOptions[desiredOption]; !ok {
|
||||||
foundOptions[desiredOption] = []string{}
|
foundOptions[desiredOption] = []string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parts := strings.SplitN(option, "=", 2)
|
||||||
|
if len(parts) != 2 {
|
||||||
|
common.LogWarn(fmt.Sprintf("Invalid docker option found for %s: %s", appName, option))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
foundOptions[desiredOption] = append(foundOptions[desiredOption], parts[1])
|
foundOptions[desiredOption] = append(foundOptions[desiredOption], parts[1])
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -127,6 +127,12 @@ func GetSpecifiedDockerOptionsForPhase(appName string, phase string, desiredOpti
|
|||||||
foundOptions[desiredOption] = []string{}
|
foundOptions[desiredOption] = []string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parts := strings.SplitN(option, " ", 2)
|
||||||
|
if len(parts) != 2 {
|
||||||
|
common.LogWarn(fmt.Sprintf("Invalid docker option found for %s: %s", appName, option))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
foundOptions[desiredOption] = append(foundOptions[desiredOption], parts[1])
|
foundOptions[desiredOption] = append(foundOptions[desiredOption], parts[1])
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user