Merge pull request #2705 from ijc/linuxkit-pkg

linuxkit pkg: Handle build --dev later
This commit is contained in:
Ian Campbell 2017-11-10 13:26:01 +00:00 committed by GitHub
commit 1e2dff62fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,16 +92,6 @@ func NewFromCLI(fs *flag.FlagSet, args ...string) (Pkg, error) {
return Pkg{}, err
}
if devMode {
// If --org is also used then this will be overwritten
// by argOrg when we iterate over the provided options
// in the fs.Visit block below.
pi.Org = os.Getenv("USER")
if hash == "" {
hash = "dev"
}
}
if hashPath == "" {
hashPath = pkgPath
} else {
@ -129,6 +119,16 @@ func NewFromCLI(fs *flag.FlagSet, args ...string) (Pkg, error) {
return Pkg{}, fmt.Errorf("Image field is required")
}
if devMode {
// If --org is also used then this will be overwritten
// by argOrg when we iterate over the provided options
// in the fs.Visit block below.
pi.Org = os.Getenv("USER")
if hash == "" {
hash = "dev"
}
}
// Go's flag package provides no way to see if a flag was set
// apart from Visit which iterates over only those which were
// set.