diff --git a/.ci/install.sh b/.ci/install.sh index 1494da5..e86ae7a 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -5,6 +5,10 @@ set -e RELEASE="latest" OS="$(uname -s)" +case "${OS}" in + MINGW* | Win*) OS="Windows" ;; +esac + if [ -d "$HOME/.fnm" ]; then INSTALL_DIR="$HOME/.fnm" elif [ -n "$XDG_DATA_HOME" ]; then @@ -70,6 +74,9 @@ set_filename() { elif [ "$OS" = "Darwin" ]; then USE_HOMEBREW="true" echo "Downloading fnm using Homebrew..." + elif [ "$OS" = "Windows" ] ; then + FILENAME="fnm-windows" + echo "Downloading the latest fnm binary from GitHub..." else echo "OS $OS is not supported." echo "If you think that's a bug - please file an issue to https://github.com/Schniz/fnm/issues" @@ -180,6 +187,7 @@ setup_shell() { echo ' set PATH "'"$INSTALL_DIR"'" $PATH' echo ' fnm env | source' + echo '' >>$CONF_FILE echo '# fnm' >>$CONF_FILE echo 'set PATH "'"$INSTALL_DIR"'" $PATH' >>$CONF_FILE echo 'fnm env | source' >>$CONF_FILE