fix(err): When Katenary fails, help message was displayed
This is because Cobra thought the command was not correct.
This commit is contained in:
@@ -146,11 +146,11 @@ func generateConvertCommand() *cobra.Command {
|
|||||||
convertCmd := &cobra.Command{
|
convertCmd := &cobra.Command{
|
||||||
Use: "convert",
|
Use: "convert",
|
||||||
Short: "Converts a docker-compose file to a Helm Chart",
|
Short: "Converts a docker-compose file to a Helm Chart",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if len(strings.TrimSpace(givenAppVersion)) > 0 {
|
if len(strings.TrimSpace(givenAppVersion)) > 0 {
|
||||||
appVersion = &givenAppVersion
|
appVersion = &givenAppVersion
|
||||||
}
|
}
|
||||||
return generator.Convert(generator.ConvertOptions{
|
if err := generator.Convert(generator.ConvertOptions{
|
||||||
Force: force,
|
Force: force,
|
||||||
OutputDir: outputDir,
|
OutputDir: outputDir,
|
||||||
Profiles: profiles,
|
Profiles: profiles,
|
||||||
@@ -159,7 +159,9 @@ func generateConvertCommand() *cobra.Command {
|
|||||||
ChartVersion: chartVersion,
|
ChartVersion: chartVersion,
|
||||||
Icon: icon,
|
Icon: icon,
|
||||||
EnvFiles: envFiles,
|
EnvFiles: envFiles,
|
||||||
}, dockerComposeFile...)
|
}, dockerComposeFile...); err != nil {
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user