Skip to content

Commit ef453bf

Browse files
committed
runjob do not need a token
1 parent a9de43c commit ef453bf

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cmd/root/root.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"io/ioutil"
2222
"net/http"
2323
"os"
24+
"strings"
2425

2526
_gitlab "github.com/factorysh/factory-cli/gitlab"
2627
homedir "github.com/mitchellh/go-homedir"
@@ -83,8 +84,11 @@ Full documentation:
8384
}
8485
}
8586
if GitlabToken == "" {
86-
fmt.Println("You must provide a valid gitlab token")
87-
os.Exit(1)
87+
// do no raise for local command (runjob for now)
88+
if strings.HasPrefix("runjob", cmd.Use) {
89+
fmt.Println("You must provide a valid gitlab token")
90+
os.Exit(1)
91+
}
8892
} else {
8993
log.Debug(GitlabToken)
9094
}

0 commit comments

Comments
 (0)