forked from asdf-vm/asdf-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install most recent point release of inexact versions
This change will make it such that when installing a version like so: `asdf install nodejs 16.10` It would install 16.10.3, assuming 16.10.3 is the latest point release at the time of installation. This change allows asdf to work better with legacy version specifiers such as what would be stored in `.nvmrc`. For this to work properly, it would also (in the example above), symlink 16.10 to point to 16.10.3 (and likewise to link 16 to 16.10.3). Such symlinks are expected to point to the latest version installed that satisfies the partial version number. An uninstallation script has to be added so that symlinks aren't left dangling at any point. This fix addresses issue asdf-vm#295.
- Loading branch information
Daniel Falk
committed
Jan 13, 2023
1 parent
c9e5df4
commit ad1c77c
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Unoffical Bash "strict mode" | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
set -euo pipefail | ||
|
||
IFS=$'\t\n' # Stricter IFS settings | ||
|
||
|
||
# shellcheck source=bin/utils.sh | ||
source "$(dirname "$0")/../lib/utils.sh" | ||
|
||
rm -rf "$ASDF_INSTALL_PATH" || true | ||
|
||
update_version_symlinks "$(dirname "$ASDF_INSTALL_PATH")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters