File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "fmt"
55 "strconv"
66
7- "github.com/basecamp/fizzy-cli/internal/errors"
87 "github.com/basecamp/fizzy-sdk/go/pkg/generated"
98 "github.com/spf13/cobra"
109)
@@ -152,7 +151,7 @@ var commentCreateCmd = &cobra.Command{
152151 return err
153152 }
154153 if body == "" {
155- return errors . NewInvalidArgsError ( "required flag -- body or -- body_file or -- attach not provided " )
154+ return newRequiredFlagError ( " body, body_file, or attach" )
156155 }
157156
158157 cardNumber := commentCreateCard
Original file line number Diff line number Diff line change @@ -86,7 +86,10 @@ func validateAttachmentPath(path string) error {
8686 if err != nil {
8787 return errors .NewError (fmt .Sprintf ("Failed to open attachment %s: %v" , path , err ))
8888 }
89- return file .Close ()
89+ if err := file .Close (); err != nil {
90+ return errors .NewError (fmt .Sprintf ("Failed to close attachment %s: %v" , path , err ))
91+ }
92+ return nil
9093}
9194
9295func appendAttachmentTags (content string , sgids []string ) string {
You can’t perform that action at this time.
0 commit comments