We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4bd12e1 + c9876f4 commit 1eeb12fCopy full SHA for 1eeb12f
cmd/compose/version.go
@@ -42,6 +42,11 @@ func versionCommand() *cobra.Command {
42
runVersion(opts)
43
return nil
44
},
45
+ PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
46
+ // overwrite parent PersistentPreRunE to avoid trying to load
47
+ // compose file on version command if COMPOSE_FILE is set
48
+ return nil
49
+ },
50
}
51
// define flags for backward compatibility with com.docker.cli
52
flags := cmd.Flags()
0 commit comments