Update cli package

The old one has bug when showing help message for IntFlags.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang
2016-05-10 13:58:09 +08:00
parent be46e644f6
commit 8477638aab
32 changed files with 2259 additions and 306 deletions
+6 -5
View File
@@ -64,7 +64,7 @@ container on your host.`,
Usage: "path to the root of the bundle directory",
},
},
Action: func(context *cli.Context) {
Action: func(context *cli.Context) error {
spec := specs.Spec{
Version: specs.Version,
Platform: specs.Platform{
@@ -201,19 +201,20 @@ container on your host.`,
bundle := context.String("bundle")
if bundle != "" {
if err := os.Chdir(bundle); err != nil {
fatal(err)
return err
}
}
if err := checkNoFile(specConfig); err != nil {
fatal(err)
return err
}
data, err := json.MarshalIndent(&spec, "", "\t")
if err != nil {
fatal(err)
return err
}
if err := ioutil.WriteFile(specConfig, data, 0666); err != nil {
fatal(err)
return err
}
return nil
},
}