Skip to content

Commit

Permalink
Fixed a regression in update_boot2docker. Fixes #1010
Browse files Browse the repository at this point in the history
- Added WIN_HOME variable for Babun/WSL
- Added missing DEFAULT_MACHINE_ISO_PATH variable
  • Loading branch information
Leonid Makarov committed Mar 21, 2019
1 parent cb38a29 commit 1c2f564
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion bin/fin
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

FIN_VERSION=1.83.0
FIN_VERSION=1.83.1

if [[ "$TERM" != "dumb" ]]; then
# Console colors
Expand Down Expand Up @@ -151,6 +151,13 @@ if is_windows; then
BABUN_WIN_HOME=${HOME}
HOME=$(cygpath_abs_unix ${HOME})
fi
# Windows user home directory
# WIN_HOME is a Unix path, e.g. /c/Users/user
if is_windows; then
WIN_HOME=$(cygpath -u ${USERPROFILE})
elif is_wsl; then
WIN_HOME=$(wsl_path -u $(wsl_env "USERPROFILE"))
fi

# Directory structure in ~/.docksal
CONFIG_DIR="$HOME/.docksal"
Expand Down Expand Up @@ -4451,6 +4458,16 @@ update_boot2docker ()
# Perform an upgrade without a rebuild for boot2docker versions 18.09+
docker_machine_stop &>/dev/null

# Path to boot2docker.iso for the machine
local DEFAULT_MACHINE_ISO_PATH=".docker/machine/machines/${DEFAULT_MACHINE_NAME}/boot2docker.iso"
# On Windows (Babun and WSL) machines are stores in the Windows user profile
if is_windows || is_wsl; then
DEFAULT_MACHINE_ISO_PATH="${WIN_HOME}/${DEFAULT_MACHINE_ISO_PATH}"
else
# Mac - straightforward
DEFAULT_MACHINE_ISO_PATH="${HOME}/${DEFAULT_MACHINE_ISO_PATH}"
fi

echo-green "Downloading boot2docker.iso v${REQUIREMENTS_DOCKER}"
# Download to temporary location, then move to the permanent location.
# This minimizes the chance of getting a corrupt file if the download fails or is interrupted.
Expand Down

0 comments on commit 1c2f564

Please sign in to comment.