Skip to content

Commit 608a80e

Browse files
author
Alexis Sellier
committed
Change DEVPSACE_PROFILES format to a space separated list of string
1 parent 95a69cb commit 608a80e

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

pkg/devspace/config/loader/variable/predefined_variable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var predefinedVars = map[string]PredefinedVariableFunction{
7979
return GetLastProfile(options.Profile), nil
8080
},
8181
"DEVSPACE_PROFILES": func(ctx context.Context, options *PredefinedVariableOptions, log log.Logger) (interface{}, error) {
82-
return options.Profile, nil
82+
return strings.Join(options.Profile, " "), nil
8383
},
8484
"DEVSPACE_USER_HOME": func(ctx context.Context, options *PredefinedVariableOptions, log log.Logger) (interface{}, error) {
8585
homeDir, err := homedir.Dir()

pkg/devspace/pipeline/engine/basichandler/commands/is_in.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
package commands
22

33
import (
4+
"strings"
5+
46
"mvdan.cc/sh/v3/interp"
57
)
68

79
func IsIn(args []string) error {
8-
if len(args) < 2 {
10+
if len(args) != 2 {
911
return interp.NewExitStatus(1)
1012
}
11-
needed := args[0]
12-
for _, value := range args[1:] {
13-
if value == needed {
13+
values := strings.Split(args[1], " ")
14+
for _, value := range values {
15+
if value == args[0] {
1416
return interp.NewExitStatus(0)
1517
}
1618
}

0 commit comments

Comments
 (0)