forked from LaconicNetwork/kompose
Merge pull request #702 from containscafeine/remove_unused_parameter
remove unused parameter from ValidateComposeFile()
This commit is contained in:
commit
0143deee8b
@ -88,7 +88,7 @@ var convertCmd = &cobra.Command{
|
|||||||
|
|
||||||
// Validate before doing anything else. Use "bundle" if passed in.
|
// Validate before doing anything else. Use "bundle" if passed in.
|
||||||
app.ValidateFlags(GlobalBundle, args, cmd, &ConvertOpt)
|
app.ValidateFlags(GlobalBundle, args, cmd, &ConvertOpt)
|
||||||
app.ValidateComposeFile(cmd, &ConvertOpt)
|
app.ValidateComposeFile(&ConvertOpt)
|
||||||
},
|
},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ var downCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate before doing anything else.
|
// Validate before doing anything else.
|
||||||
app.ValidateComposeFile(cmd, &DownOpt)
|
app.ValidateComposeFile(&DownOpt)
|
||||||
},
|
},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
app.Down(DownOpt)
|
app.Down(DownOpt)
|
||||||
|
|||||||
@ -60,7 +60,7 @@ var upCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate before doing anything else.
|
// Validate before doing anything else.
|
||||||
app.ValidateComposeFile(cmd, &UpOpt)
|
app.ValidateComposeFile(&UpOpt)
|
||||||
},
|
},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
app.Up(UpOpt)
|
app.Up(UpOpt)
|
||||||
|
|||||||
@ -136,7 +136,7 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ValidateComposeFile validated the compose file provided for conversion
|
// ValidateComposeFile validated the compose file provided for conversion
|
||||||
func ValidateComposeFile(cmd *cobra.Command, opt *kobject.ConvertOptions) {
|
func ValidateComposeFile(opt *kobject.ConvertOptions) {
|
||||||
if len(opt.InputFiles) == 0 {
|
if len(opt.InputFiles) == 0 {
|
||||||
// Here docker-compose is the input
|
// Here docker-compose is the input
|
||||||
opt.InputFiles = []string{"docker-compose.yml"}
|
opt.InputFiles = []string{"docker-compose.yml"}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user