Skip to content

Commit

Permalink
Merge pull request #25 from web-of-things-open-source/fix/create-toc
Browse files Browse the repository at this point in the history
fix: do not create toc if no remote could be determined
  • Loading branch information
hadjian authored Nov 29, 2023
2 parents befd573 + c8514b1 commit 989f36f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/create-toc.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ func executeCreateTOC(cmd *cobra.Command, args []string) {

remote, err := remotes.Get(remoteName)
if err != nil {
//TODO: log to stderr or logger ?
log.Error(fmt.Sprintf("could not initialize a remote instance for %s. check config", remoteName), "error", err)
os.Exit(1)
}

err = remote.CreateToC()

if err != nil {
//TODO: log to stderr or logger ?
log.Error(err.Error())
os.Exit(1)
}
Expand Down

0 comments on commit 989f36f

Please sign in to comment.