Skip to content

Commit 849df8e

Browse files
NoevaMNoeva
authored andcommitted
Added --apply-namespace option
1 parent 7f6f08a commit 849df8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commands/deploy_command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func (c *DeployCommand) executeInternal(positionalArgs []string, dsHost string,
348348
// Build the process instance
349349
processBuilder := NewDeploymentStrategy(flags, c.processTypeProvider).CreateProcessBuilder()
350350
processBuilder.Namespace(namespace)
351-
if(namespace == "") {
351+
if(len(namespace) == 0) {
352352
processBuilder.Parameter("applyNamespaceAppNames", "false")
353353
processBuilder.Parameter("applyNamespaceServiceNames", "false")
354354
processBuilder.Parameter("applyNamespaceAppRoutes", "false")
@@ -679,7 +679,7 @@ func (deployCommandFlagsValidator) ValidateParsedFlags(flags *flag.FlagSet) erro
679679
return
680680
}
681681
case applyNamespaceAppNamesOpt, applyNamespaceServiceNamesOpt, applyNamespaceAppRoutesOpt:
682-
if e := ValidateBooleanFlag(f.Name, flags); e != nil {
682+
if e := ValidateNamespaceBooleanFlag(f.Name, flags); e != nil {
683683
err = e
684684
return
685685
}
@@ -701,7 +701,7 @@ func ValidateTimeoutOption(optionName string, flags *flag.FlagSet, maxAllowedVal
701701
return nil
702702
}
703703

704-
func ValidateBooleanFlag(flagName string, flags *flag.FlagSet) error {
704+
func ValidateNamespaceBooleanFlag(flagName string, flags *flag.FlagSet) error {
705705
flagValueStr := flags.Lookup(flagName).Value.String()
706706

707707
if flagValueStr == "" {

0 commit comments

Comments
 (0)