Redact credentials throughout publication recovery displays
This commit is contained in:
@@ -108,7 +108,7 @@ func reportPublicationRecord(result releasekit.PublicationResult, publicationErr
|
||||
if result.RecordPath == "" {
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(stderr, "publication record saved: %s\n", result.RecordPath)
|
||||
fmt.Fprintf(stderr, "publication record saved: %s\n", git.DisplayDiagnostic(result.RecordPath))
|
||||
if publicationErr == nil || !publicationOffersRecovery(result.Phase) {
|
||||
return
|
||||
}
|
||||
@@ -118,7 +118,7 @@ func reportPublicationRecord(result releasekit.PublicationResult, publicationErr
|
||||
fmt.Fprintln(stderr, "Use your selected supported ReleaseKit CLI with this record if the original executable is unavailable.")
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(stderr, "recovery command: %s\n", command)
|
||||
fmt.Fprintf(stderr, "recovery command: %s\n", git.DisplayDiagnostic(command))
|
||||
fmt.Fprintln(stderr, "If this executable is unavailable, use your selected supported ReleaseKit CLI with the same record.")
|
||||
}
|
||||
|
||||
@@ -140,7 +140,8 @@ func publicationRecoveryCommand(recordPath string) (string, error) {
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("resolve current executable path: %w", err)
|
||||
}
|
||||
recordPath, err = filepath.Abs(recordPath)
|
||||
// Redact before path cleaning can change a pasted URL's recognizable syntax.
|
||||
recordPath, err = filepath.Abs(git.DisplayDiagnostic(recordPath))
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("resolve publication record path: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user