Skip to content

Commit

Permalink
login: print forward slashes in tool path (#43)
Browse files Browse the repository at this point in the history
Bazel doesn't like Windows backslashes.
  • Loading branch information
jayconrod authored Aug 26, 2024
1 parent 1782cb7 commit 2ca9bdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/engflow_auth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,14 @@ Visit %s for help.`,
)
}

// Bazel on Windows rejects paths with backslashes like C:\foo in .bazelrc.
// Print a path with forward slashes instead.
cmdPath := filepath.ToSlash(os.Args[0])
fmt.Fprintf(
cliCtx.App.ErrWriter,
"Successfully saved credentials for %[1]s.\nTo use, ensure the line below is in your .bazelrc:\n\n\tbuild --credential_helper=%[1]s=%s\n",
clusterURL.Hostname(),
os.Args[0])
cmdPath)

return nil
}
Expand Down

0 comments on commit 2ca9bdf

Please sign in to comment.