Skip to content

Commit

Permalink
fix: install shorebird's internal flutter version before install
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartel committed Jan 17, 2024
1 parent 6ef36d0 commit a779475
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ install_version() {

(
mkdir -p "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/.git "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"

local tool_cmd
tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)"

# shorebird downloads and caches its internal flutter version on first use
"$ASDF_DOWNLOAD_PATH/bin/$tool_cmd"

cp -r "$ASDF_DOWNLOAD_PATH"/.git "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"

# avoid file permission override when asdf core deletes the download folder
rm -rf "$ASDF_DOWNLOAD_PATH"/.git

test -x "$install_path/bin/$tool_cmd" || fail "Expected $install_path/bin/$tool_cmd to be executable."

echo "$TOOL_NAME $version installation was successful!"
Expand Down

0 comments on commit a779475

Please sign in to comment.