Conversation
--repo, --credential, and --askpass-url take defaults from environment variables. pflag echoes DefValue on --help and parse errors, so a token in those variables shows up in the sidecar log. Replace the displayed default when the env var is set; the value that is parsed stays put. Signed-off-by: Dean Chen <862469039@qq.com>
|
Welcome @locker95! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: locker95 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
--repo, --credential, and --askpass-url take their defaults from the environment. pflag then prints that default in --help and when flag parsing fails, so a token in GITSYNC_REPO or GITSYNC_CREDENTIAL lands in the sidecar log.
The startup line already redacts these. This only changes the text pflag shows for the default, and only when the env var is actually set. An empty --credential still prints
[]. The value that gets parsed is unchanged.Fixes #1001