Skip to content

Commit

Permalink
fix bug causing lando setup fail on POSIX for lando <3.24
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Dec 11, 2024
1 parent 6e31954 commit bf24afa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Fixed bug unintentionally disabling `lando setup` on `POSIX` for Lando `<3.24`

## v3.7.1 - [December 7, 2024](https://github.com/lando/setup-lando/releases/tag/v3.7.1)

* Removed `lando setup` and `-slim` functionality for upcoming Lando `>=3.24`
Expand Down
8 changes: 5 additions & 3 deletions setup-lando.sh
Original file line number Diff line number Diff line change
Expand Up @@ -582,16 +582,18 @@ else
debug "resolved v${LMV} version '${ORIGINAL_VERSION}' to ${VERSION} (${URL})"
fi

# fatty slim
SLIM_SETUPY=$(version_compare "3.23.0" "$SVERSION" && echo '1' || echo '0')

# autoslim all v3 urls by default
# @TODO: restrict this to 3 < 3.24.0 at some point?
if [[ $URL != file://* ]] && [[ -z "${VERSION_DEV-}" ]] && [[ $FAT != '1' ]] && version_compare "3.23" "$SVERSION"; then
if [[ $URL != file://* ]] && [[ -z "${VERSION_DEV-}" ]] && [[ $FAT != '1' ]] && [[ $SLIM_SETUPY == '1' ]]; then
URL="${URL}-slim"
HRV="$VERSION-slim"
debug "autoslimin url for lando 3 to $URL"
fi

# force setup to 0 if lando 4
if [[ $SETUP == '1' ]] && version_compare "$SVERSION" "3.23"; then
if [[ $SETUP == '1' ]] && [[ $SLIM_SETUPY == '0' ]]; then
SETUP=0
debug "disabled autosetup --setup=${SETUP}, not needed in <3.24"
fi
Expand Down

0 comments on commit bf24afa

Please sign in to comment.