Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func Download(ctx *cli.Context) {

args := ctx.Args()
if len(args) != 1 {
msg := "Usage: exercism download SUBMISSION_ID"
log.Fatal(msg)
fmt.Fprintf(os.Stderr, "Usage: exercism download SUBMISSION_ID")
os.Exit(1)
}

submission, err := client.Download(args[0])
Expand Down
5 changes: 3 additions & 2 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"fmt"
"log"
"os"

"github.com/codegangsta/cli"
"github.com/exercism/cli/api"
Expand All @@ -20,8 +21,8 @@ func List(ctx *cli.Context) {
args := ctx.Args()

if len(args) != 1 {
msg := "Usage: exercism list TRACK_ID"
log.Fatal(msg)
fmt.Fprintf(os.Stderr, "Usage: exercism list TRACK_ID")
os.Exit(1)
}

trackID := args[0]
Expand Down
6 changes: 4 additions & 2 deletions cmd/open.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package cmd

import (
"fmt"
"log"
"os"
"os/exec"
"runtime"
"strings"
Expand All @@ -21,8 +23,8 @@ func Open(ctx *cli.Context) {

args := ctx.Args()
if len(args) != 2 {
msg := "Usage: exercism open TRACK_ID PROBLEM"
log.Fatal(msg)
fmt.Fprintf(os.Stderr, "Usage: exercism open TRACK_ID PROBLEM")
os.Exit(1)
}

trackID := args[0]
Expand Down
5 changes: 3 additions & 2 deletions cmd/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"fmt"
"log"
"os"

"github.com/codegangsta/cli"
"github.com/exercism/cli/api"
Expand All @@ -18,8 +19,8 @@ func Skip(ctx *cli.Context) {
args := ctx.Args()

if len(args) != 2 {
msg := "Usage: exercism skip TRACK_ID PROBLEM"
log.Fatal(msg)
fmt.Fprintf(os.Stderr, "Usage: exercism skip TRACK_ID PROBLEM")
os.Exit(1)
}

var (
Expand Down
4 changes: 3 additions & 1 deletion cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"fmt"
"log"
"os"

"github.com/codegangsta/cli"
"github.com/exercism/cli/api"
Expand All @@ -19,7 +20,8 @@ func Status(ctx *cli.Context) {
args := ctx.Args()

if len(args) != 1 {
log.Fatal("Usage: exercism status TRACK_ID")
fmt.Fprintf(os.Stderr, "Usage: exercism status TRACK_ID")
os.Exit(1)
}

client := api.NewClient(c)
Expand Down