Return non-zero exit code on overlay sub-commands
Signed-off-by: xu yang <xyang@ciq.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
795c44e650
commit
97c6772e51
@@ -19,7 +19,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
controller := warewulfconf.Get()
|
||||
nodeDB, err := node.New()
|
||||
if err != nil {
|
||||
return fmt.Errorf("couldn't open node configuration: %s", err)
|
||||
return fmt.Errorf("could not open node configuration: %s", err)
|
||||
}
|
||||
|
||||
db, err := nodeDB.FindAllNodes()
|
||||
@@ -89,7 +89,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("Some overlays failed to be generated: %s", err)
|
||||
return fmt.Errorf("some overlays failed to be generated: %s", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user