Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
sending errors to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmor committed Feb 13, 2020
1 parent fb3ec99 commit ce06aa4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"log"
"os"

mets "github.com/athul/pwcli/methods"
Expand Down Expand Up @@ -119,7 +120,8 @@ func main() {

err := app.Run(os.Args)
if err != nil {
l := log.New(os.Stderr, "", 0)
c := color.New(color.FgRed).Add(color.Bold)
c.Println(fmt.Sprintf("\n%s", err.Error()))
l.Println(c.Sprintf("\n%s", err.Error()))
}
}

0 comments on commit ce06aa4

Please sign in to comment.