context: move user note to stderr

The NOTE shown when an explicit login isn't provided is output on Stdout
instead of Stderr. This messes up the output of any commands when piping
them to a tool such as `yq`. Move this human readable information to
Stderr so it doesn't break any automated parsing.
This commit is contained in:
Jake Hillion 2024-04-01 17:11:12 +01:00
parent 4fedaaafe1
commit 3ea28265b0
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ and then run your command again.`)
}
os.Exit(1)
}
fmt.Printf("NOTE: no gitea login detected, falling back to login '%s'\n", c.Login.Name)
fmt.Fprintf(os.Stderr, "NOTE: no gitea login detected, falling back to login '%s'\n", c.Login.Name)
}
// parse reposlug (owner falling back to login owner if reposlug contains only repo name)