Skip to content

Commit

Permalink
cmdutil: print rng TEST MODE... warning to stderr
Browse files Browse the repository at this point in the history
Printing on stdout interferes with the json output from
`otk-gen-partition-table`.
  • Loading branch information
mvo5 committed Sep 2, 2024
1 parent b399bd6 commit 5adc55b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmdutil/rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func newRNGSeed() (int64, error) {
if err != nil {
return 0, fmt.Errorf("failed to parse %s: %s", RNG_SEED_ENV_KEY, err)
}
fmt.Printf("TEST MODE: using rng seed %d\n", envSeedInt)
fmt.Fprintf(os.Stderr, "TEST MODE: using rng seed %d\n", envSeedInt)
return envSeedInt, nil
}
randSeed, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64))
Expand Down

0 comments on commit 5adc55b

Please sign in to comment.