Skip to content

Commit

Permalink
Wrap the whole check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Nov 11, 2024
1 parent a9edac2 commit 57d8c8a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bin/environment/mutagen-version-check.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

function Environment::checkMutagenVersion() {
local mutagenInstalledVersion="$(Mutagen::getInstalledVersion)"
if [[ "${_PLATFORM}" == "macos" ]]; then
local mutagenInstalledVersion="$(Mutagen::getInstalledVersion)"

if [[ "${_PLATFORM}" == "macos" && ( "$mutagenInstalledVersion" == 0.18.* || "$mutagenInstalledVersion" > "0.18" ) ]]; then
Console::error "Error: Mutagen version 0.18.* is not supported yet. Please, run the command to install the latest supported version.
brew unlink mutagen && brew unlink mutagen-compose && brew install mutagen-io/mutagen/[email protected] mutagen-io/mutagen/[email protected]"
exit 1
if [[ "$mutagenInstalledVersion" == 0.18.* || "$mutagenInstalledVersion" > "0.18" ]]; then
Console::error "Error: Mutagen version 0.18.* is not supported yet. Please, run the command to install the latest supported version.
brew unlink mutagen && brew unlink mutagen-compose && brew install mutagen-io/mutagen/[email protected] mutagen-io/mutagen/[email protected]"
exit 1
fi
fi
}

Expand Down

0 comments on commit 57d8c8a

Please sign in to comment.