Skip to content

If authFile is missing, try to use the user's default .netrc file (~/.netrc)#387

Open
grepwood wants to merge 1 commit intobazeltools:masterfrom
grepwood:master
Open

If authFile is missing, try to use the user's default .netrc file (~/.netrc)#387
grepwood wants to merge 1 commit intobazeltools:masterfrom
grepwood:master

Conversation

@grepwood
Copy link
Copy Markdown

@grepwood grepwood commented Sep 3, 2024

I have come across this problem at work and I needed to be able to generate a workspace.bzl that includes some kind of way to read my .netrc file without specifying a path to it in the authFile parameter, because this will never ever be the same constant path on developer workstations and our CICD.

This PR sums up the necessary changes in order for bazel-deps to be able to do that.

Just to be clear:

  • the authFile support in dependencies.yaml is not going away, it's still the dominant setting
  • in absence of authFile, _get_auth() will try to get the contents of ~/.netrc or if it doesn't exist return an empty dictionary

Also, this is my first time writing Scala code. Please please please please please tell me if I wrote the assembly of jarArtifactImpl with the variable part in between correctly.

…did not specify an authFile, we will generate code that still attempts to read the user's personal .netrc file from their home directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant