Merge pull request #3934 from deitch/fix-name-output-build-bug

handle conflict with name and output
This commit is contained in:
Avi Deitcher 2023-06-12 04:01:53 -07:00 committed by GitHub
commit 655c7fb807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ The generated image can be in one of multiple formats which can be run on variou
Example: ` linuxkit build [options] <file>[.yml]`,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if name == "" {
if name == "" && outputFile == "" {
conf := args[len(args)-1]
if conf == "-" {
name = defaultNameForStdin