Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3] Fix shim script to launch correct version #4

Merged
merged 6 commits into from Oct 24, 2021

Conversation

raxod502
Copy link
Contributor

Before:

% ASDF_BUNDLER_VERSION=1.17.3 asdf exec bundle version
Bundler version 2.1.2 (2021-05-12 commit unknown)
% ASDF_BUNDLER_VERSION=2.2.24 asdf exec bundle version
Bundler version 2.1.2 (2021-05-12 commit unknown)

After:

% ASDF_BUNDLER_VERSION=1.17.3 asdf exec bundle version
Bundler version 1.17.3 (2018-12-27 commit d7089abb6)
% ASDF_BUNDLER_VERSION=2.2.24 asdf exec bundle version
Bundler version 2.2.24 (2021-07-15 commit d78b1ee235)

bin/install Outdated

ls "${ASDF_INSTALL_PATH}/exe" | while read file; do
cat "${ASDF_INSTALL_PATH}/exe/${file}" | \
sed -E "s|#!/usr/bin/env ruby|#!/usr/bin/env -S RUBYLIB=${ASDF_INSTALL_PATH}/lib ruby|" > \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sed in place instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@jonathanmorley
Copy link
Owner

Can we add some regression tests? (even just the examples you listed above)

@raxod502
Copy link
Contributor Author

Do you happen to know why the existing test suite didn't find this issue already? I see that you are using asdf-vm/actions/plugin-test, but perhaps it just runs the command and does not check that the version is correct?

@dvicory
Copy link

dvicory commented Oct 11, 2021

I'm having this issue as well - the default bundler with ruby ends up getting used. Using this branch fixes it. What would it take to move forward on this?

@raxod502
Copy link
Contributor Author

Ah, CI is not passing yet! asdf-vm/asdf#1078 needs to be merged upstream :)

@raxod502 raxod502 deleted the fix-shim branch October 24, 2021 23:51
@raxod502 raxod502 mentioned this pull request Oct 24, 2021
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.

None yet

3 participants