Skip to content

Commit

Permalink
Merge pull request #233 from buckley310/uint
Browse files Browse the repository at this point in the history
parse environment variables to uint
  • Loading branch information
justjanne authored Oct 2, 2020
2 parents 677c046 + 1b709af commit 79e78b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions segment-hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func segmentHost(p *powerline) []pwl.Segment {
hostName := getHostName(p.hostname)
hostPrompt = hostName

foregroundEnv, foregroundEnvErr := strconv.ParseInt(os.Getenv("PLGO_HOSTNAMEFG"), 0, 8)
backgroundEnv, backgroundEnvErr := strconv.ParseInt(os.Getenv("PLGO_HOSTNAMEBG"), 0, 8)
foregroundEnv, foregroundEnvErr := strconv.ParseUint(os.Getenv("PLGO_HOSTNAMEFG"), 0, 8)
backgroundEnv, backgroundEnvErr := strconv.ParseUint(os.Getenv("PLGO_HOSTNAMEBG"), 0, 8)
if foregroundEnvErr == nil && backgroundEnvErr == nil {
foreground = uint8(foregroundEnv)
background = uint8(backgroundEnv)
Expand Down

0 comments on commit 79e78b1

Please sign in to comment.