File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ func Download(ctx *cli.Context) {
2323
2424 args := ctx .Args ()
2525 if len (args ) != 1 {
26- msg := "Usage: exercism download SUBMISSION_ID"
27- log . Fatal ( msg )
26+ fmt . Fprintf ( os . Stderr , "Usage: exercism download SUBMISSION_ID" )
27+ os . Exit ( 1 )
2828 }
2929
3030 submission , err := client .Download (args [0 ])
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cmd
33import (
44 "fmt"
55 "log"
6+ "os"
67
78 "github.com/codegangsta/cli"
89 "github.com/exercism/cli/api"
@@ -20,8 +21,8 @@ func List(ctx *cli.Context) {
2021 args := ctx .Args ()
2122
2223 if len (args ) != 1 {
23- msg := "Usage: exercism list TRACK_ID"
24- log . Fatal ( msg )
24+ fmt . Fprintf ( os . Stderr , "Usage: exercism list TRACK_ID" )
25+ os . Exit ( 1 )
2526 }
2627
2728 trackID := args [0 ]
Original file line number Diff line number Diff line change 11package cmd
22
33import (
4+ "fmt"
45 "log"
6+ "os"
57 "os/exec"
68 "runtime"
79 "strings"
@@ -21,8 +23,8 @@ func Open(ctx *cli.Context) {
2123
2224 args := ctx .Args ()
2325 if len (args ) != 2 {
24- msg := "Usage: exercism open TRACK_ID PROBLEM"
25- log . Fatal ( msg )
26+ fmt . Fprintf ( os . Stderr , "Usage: exercism open TRACK_ID PROBLEM" )
27+ os . Exit ( 1 )
2628 }
2729
2830 trackID := args [0 ]
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cmd
33import (
44 "fmt"
55 "log"
6+ "os"
67
78 "github.com/codegangsta/cli"
89 "github.com/exercism/cli/api"
@@ -18,8 +19,8 @@ func Skip(ctx *cli.Context) {
1819 args := ctx .Args ()
1920
2021 if len (args ) != 2 {
21- msg := "Usage: exercism skip TRACK_ID PROBLEM"
22- log . Fatal ( msg )
22+ fmt . Fprintf ( os . Stderr , "Usage: exercism skip TRACK_ID PROBLEM" )
23+ os . Exit ( 1 )
2324 }
2425
2526 var (
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cmd
33import (
44 "fmt"
55 "log"
6+ "os"
67
78 "github.com/codegangsta/cli"
89 "github.com/exercism/cli/api"
@@ -19,7 +20,8 @@ func Status(ctx *cli.Context) {
1920 args := ctx .Args ()
2021
2122 if len (args ) != 1 {
22- log .Fatal ("Usage: exercism status TRACK_ID" )
23+ fmt .Fprintf (os .Stderr , "Usage: exercism status TRACK_ID" )
24+ os .Exit (1 )
2325 }
2426
2527 client := api .NewClient (c )
You can’t perform that action at this time.
0 commit comments