fix(hz): validate ".hz" failed when specify the "out_dir" flag (#497)

This commit is contained in:
kinggo 2022-12-27 20:37:30 +08:00 committed by GitHub
parent f4419138c7
commit 1b9a45e7ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -57,17 +57,17 @@ func New(c *cli.Context) error {
}
func Update(c *cli.Context) error {
manifest := new(meta.Manifest)
err := manifest.Validate(".")
if err != nil {
return cli.Exit(err, meta.LoadError)
}
// begin to update
args, err := globalArgs.Parse(c, meta.CmdUpdate)
if err != nil {
return cli.Exit(err, meta.LoadError)
}
manifest := new(meta.Manifest)
err = manifest.Validate(args.OutDir)
if err != nil {
return cli.Exit(err, meta.LoadError)
}
setLogVerbose(args.Verbose)
logs.Debugf("Args: %#v\n", args)