Skip to content

Commit

Permalink
fix(build): setting nodejs version (#2200)
Browse files Browse the repository at this point in the history
for example with the engine set to ^18.19.1 in package.json:  avoid selecting 20.18. instead of latest 18.xx

* also relax asdf manage nodejs version
  • Loading branch information
PiTrem authored Oct 8, 2024
1 parent dfb34c7 commit 732cf52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 18.20.3
nodejs 18.20.4 18.20.3
ruby 2.7.8
2 changes: 1 addition & 1 deletion prepare-nodejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ -z "$nodeversion" ]; then
fi

# find the latest version of the required version
REQUIRED_NODE_VERSION=$(asdf list all nodejs | grep -E "$nodeversion" | tail -n1)
REQUIRED_NODE_VERSION=$(asdf list all nodejs | grep -E "^$nodeversion" | tail -n1)

# Compare the versions
if [[ "$CURRENT_NODE_VERSION" == "$REQUIRED_NODE_VERSION" ]]; then
Expand Down

0 comments on commit 732cf52

Please sign in to comment.