Skip to content

Commit

Permalink
Give precedence to -hostname-file (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodauria authored May 16, 2024
1 parent a844149 commit 98c686b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ func main() {
flag.Parse()
rtx.Must(flagx.ArgsFromEnv(flag.CommandLine), "Could not get args from environment variables")

// If the -hostname flag was not set, try reading the hostname from the
// -hostname-file.
if hostnameFile.String() != "" && *hostname == "" {
// If -hostname-file was set, use it instead of -hostname.
if hostnameFile.String() != "" {
*hostname = hostnameFile.String()
}

Expand Down

0 comments on commit 98c686b

Please sign in to comment.