Suppress help on error (#46)
This commit is contained in:
@@ -20,7 +20,7 @@ func NewComputeClient(project string) (*ComputeClient, error) {
|
|||||||
|
|
||||||
s, err := compute.NewService(ctx)
|
s, err := compute.NewService(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("Couldn't initialize GCP client (Compute): %v", err)
|
err = fmt.Errorf("couldn't initialize GCP client: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
computeService := &ComputeClient{s, project}
|
computeService := &ComputeClient{s, project}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ func Execute() {
|
|||||||
Use: "speedrun",
|
Use: "speedrun",
|
||||||
Short: "Cloud first command execution",
|
Short: "Cloud first command execution",
|
||||||
Version: fmt.Sprintf("%s, commit: %s, date: %s", version, commit, date),
|
Version: fmt.Sprintf("%s, commit: %s, date: %s", version, commit, date),
|
||||||
|
SilenceUsage: true,
|
||||||
|
SilenceErrors: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
rootCmd.AddCommand(initCmd)
|
rootCmd.AddCommand(initCmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user