preCommands not executing for binarySource=global and bundler authentication #33205
Unanswered
lbarros-asml
asked this question in
Request Help
Replies: 3 comments 2 replies
-
(1) Sounds good to me. FYI @Chumper were you aware of that? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sounds good to me, I was not aware at that time |
Beta Was this translation helpful? Give feedback.
0 replies
-
What would be the next steps? May I create a PR myself? Should an issue be created for me to link a PR to it? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitHub
Please tell us more about your question or problem
EDIT: Sorry, I've linked the wrong ISSUE and PR in the first post version. Fixed now.
I'm running renovate using full image (binarySource=global) and the bundler authentication for hostnames containing hyphen ("-") is not working,
After looking at the code and the logs, I realized there is one problem with preCommands exec for binarySource=global and one improvement that could be made to remove a bundler workaround for hostnames with an hyphen, I'll detail both here:
Bundler hyphen workaround:
I found this issue and a PR, but there is actually a better fix for that problem: Bundler accepts replacing the hyphen "-" by three underscores "___" when using environment vars for authentication. For instance, you can set the credendials for "gems-private.com" by using the env var "BUNDLE_GEMS___PRIVATE__COM".
My proposal is to revert feat(bundler): add config command for hyphen hosts #9821 and change this function to also replace "-" by "___".
preCommands not being executed when binarySource=global
The bundler workaround mentioned on item 1 uses the "preCommands" array within the "ExecOptions" to execute the authentication bundler command, but when looking at the "prepareRawExec" function, it doesn't inclue the "preCommands" array to the "rawCommands" return if no "if" statement matches (binarySource=global)
Logs (if relevant)
Logs
Note: I've replaced some company information, but kept all relevant info using a similar format, e.g: repo-hyphen.com and the bundle suggested env var "BUNDLE_REPO___HYPHEN__COM"Beta Was this translation helpful? Give feedback.
All reactions