mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
linuxkit pkg: Handle build --dev later
The placement in #2679 can never have worked since we parse the yml over the struct later on. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
443e47c408
commit
012e6fe9d1
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user