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: 3 additions & 1 deletion cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ func runDownload(cfg config.Config, flags *pflag.FlagSet, args []string) error {
// TODO: handle collisions
path := sf.relativePath()
dir := filepath.Join(metadata.Dir, filepath.Dir(path))
os.MkdirAll(dir, os.FileMode(0755))
if err = os.MkdirAll(dir, os.FileMode(0755)); err != nil {
return err
}

f, err := os.Create(filepath.Join(metadata.Dir, path))
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ Pass the path to the directory that contains the solution you want to see on the
if err != nil {
return err
}
browser.Open(metadata.URL)
return nil
return browser.Open(metadata.URL)
},
}

Expand Down
4 changes: 3 additions & 1 deletion cmd/troubleshoot.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ func (status *Status) compile() (string, error) {
}

var bb bytes.Buffer
t.Execute(&bb, status)
if err = t.Execute(&bb, status); err != nil {
return "", err
}
return bb.String(), nil
}

Expand Down