Skip to content

Commit ff5afd8

Browse files
committed
Fix small issues
1 parent 5eea3e8 commit ff5afd8

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

cmd/create/space.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ func (cmd *spaceCmd) RunCreateSpace(cobraCmd *cobra.Command, args []string) {
106106
log.Fatalf("Error saving kube config: %v", err)
107107
}
108108

109-
// Set tiller env
110-
err = cloud.SetTillerNamespace(space)
111-
if err != nil {
112-
log.Warnf("Couldn't set tiller namespace environment variable: %v", err)
109+
// Set tiller env
110+
err = cloud.SetTillerNamespace(space)
111+
if err != nil {
112+
// log.Warnf("Couldn't set tiller namespace environment variable: %v", err)
113113
}
114114

115115
// Set space as active space

cmd/init.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ func (cmd *InitCmd) Run(cobraCmd *cobra.Command, args []string) {
241241
}
242242

243243
func (cmd *InitCmd) checkIfDevSpaceCloud() {
244+
cmd.useCloud = true
245+
244246
// Check if kubectl exists
245247
if _, err := os.Stat(clientcmd.RecommendedHomeFile); err == nil {
246248
cmd.useCloud = *stdinutil.GetFromStdin(&stdinutil.GetFromStdinParams{

cmd/use/space.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ func (cmd *spaceCmd) RunUseSpace(cobraCmd *cobra.Command, args []string) {
4949

5050
// Erase currently used space
5151
if args[0] == "none" {
52-
// Set tiller env
53-
err = cloudpkg.SetTillerNamespace(nil)
54-
if err != nil {
55-
log.Warnf("Couldn't set tiller namespace environment variable: %v", err)
52+
// Set tiller env
53+
err = cloudpkg.SetTillerNamespace(nil)
54+
if err != nil {
55+
// log.Warnf("Couldn't set tiller namespace environment variable: %v", err)
5656
}
5757

5858
if !configExists {
@@ -107,10 +107,10 @@ func (cmd *spaceCmd) RunUseSpace(cobraCmd *cobra.Command, args []string) {
107107
log.Fatalf("Error saving kube config: %v", err)
108108
}
109109

110-
// Set tiller env
111-
err = cloudpkg.SetTillerNamespace(space)
112-
if err != nil {
113-
log.Warnf("Couldn't set tiller namespace environment variable: %v", err)
110+
// Set tiller env
111+
err = cloudpkg.SetTillerNamespace(space)
112+
if err != nil {
113+
// log.Warnf("Couldn't set tiller namespace environment variable: %v", err)
114114
}
115115

116116
if configExists {

pkg/devspace/configure/image.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ func GetImageConfigFromDockerfile(dockerfile, context string, cloudProvider *str
9494
_, err = client.Ping(contextpkg.Background())
9595
if err != nil {
9696
// Check if docker cli is installed
97-
err := exec.Command("docker").Run()
98-
if err == nil {
97+
runErr := exec.Command("docker").Run()
98+
if runErr == nil {
9999
useKaniko = *stdinutil.GetFromStdin(&stdinutil.GetFromStdinParams{
100-
Question: "Docker seems to be installed but is not running: " + err.Error() + " \nShould we build with kaniko instead?",
101-
DefaultValue: "no",
102-
ValidationRegexPattern: "^(yes)|(no)$",
100+
Question: "Docker seems to be installed but is not running: " + err.Error() + " \nShould we build with kaniko instead?",
101+
DefaultValue: "no",
102+
Options: []string{"yes", "no"},
103103
}) == "yes"
104104

105105
if useKaniko == false {

0 commit comments

Comments
 (0)