Skip to content

Commit

Permalink
Standardise use of color
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwhitaker committed Jul 21, 2024
1 parent 1e769cb commit 27edea0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions runny/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package runny

import (
"os"

"github.com/fatih/color"
)

func Run() {
runny, err := readConfig(".runny.yaml")
if err != nil {
color.Red("Problem reading config: %v", err)
errorColor.Printf("Problem reading config: %v\n", err)
}

args := os.Args[1:]
Expand All @@ -22,7 +20,7 @@ func Run() {
case "-v", "--verbose":
runny.verbose = true
default:
color.Red("Unknown option: %s", option)
errorColor.Printf("Unknown option: %s\n", option)
os.Exit(1)
}
args = args[1:]
Expand Down
2 changes: 1 addition & 1 deletion runny/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c *Config) GetShell() Shell {
}
shell, err := NewShell(shellString)
if err != nil {
color.Red("Error: %v", err)
errorColor.Printf("Error: %v\n", err)
os.Exit(1)
}
return shell
Expand Down

0 comments on commit 27edea0

Please sign in to comment.