fix: honor JBANG_USE_NATIVE when updating - #2616
Conversation
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
quintesse
left a comment
There was a problem hiding this comment.
Very nice!
I would like to see one change though, Right now it only uses the JBANG_USE_NATIVE environment variable to determine if it should install a native bundle or not.
I would suggest that if you're currently running the native version it should also take that as a sign to install the native bundle. (Who knows, perhaps the user simply ran the native executable manually instead of setting JBANGT_USE_NATIVE)
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
|
@quintesse the requested behavior is now implemented. Native bundle selection will now triggered by either |
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
quintesse
left a comment
There was a problem hiding this comment.
LGTM, it works , any improvements can always be done at a later time
…e-native Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com> # Conflicts: # src/main/java/dev/jbang/cli/App.java
|
@quintesse fixed merge conflict in one of the file, please re-review |
Summary
Fixes #2611.
jbang version --updatenow respectsJBANG_USE_NATIVE. When native mode is enabled, JBang downloads and installs the release bundle matching the current operating system and architecture instead of always downloading the generic JAR-based package.On Windows, an in-use native executable is staged as
.exe.newand replaced by the launcher on the next invocation.The
JBANG_USE_NATIVEinstallation documentation and relevant tests have also been updated.Validation
./gradlew spotlessCheck compileTestJava./gradlew test --tests "dev.jbang.cli.TestApp"TestScriptNativeDownload