Jelajahi Sumber

Merge pull request #520 from dotcloud/519-no_command_specified-fix

- runtime: Fix the command existance check
Guillaume J. Charmes 12 tahun lalu
induk
melakukan
c3a5dd76cf
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      runtime.go

+ 1 - 1
runtime.go

@@ -127,7 +127,7 @@ func (runtime *Runtime) Create(config *Config) (*Container, error) {
 		runtime.mergeConfig(config, img.Config)
 		runtime.mergeConfig(config, img.Config)
 	}
 	}
 
 
-	if config.Cmd == nil || len(config.Cmd) < 2 {
+	if config.Cmd == nil || len(config.Cmd) == 0 {
 		return nil, fmt.Errorf("No command specified")
 		return nil, fmt.Errorf("No command specified")
 	}
 	}