From 970d371442b450782f3fcc4c34e1afe0f848672d Mon Sep 17 00:00:00 2001 From: Yehonal Date: Fri, 23 Apr 2021 14:35:41 +0200 Subject: [PATCH] fix(bash): bash errors on windows (#5406) --- acore.sh | 3 ++- apps/bash_shared/defines.sh | 5 +++++ apps/bash_shared/deno.sh | 3 ++- deps/deno/bin/.gitignore | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/acore.sh b/acore.sh index ba247e009c..59db491484 100755 --- a/acore.sh +++ b/acore.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash -set -e +[ -z "$WITH_ERRORS" ] && set -e CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + source "$CUR_PATH/apps/installer/main.sh" diff --git a/apps/bash_shared/defines.sh b/apps/bash_shared/defines.sh index ed70cac1d5..ed5f3733c9 100644 --- a/apps/bash_shared/defines.sh +++ b/apps/bash_shared/defines.sh @@ -14,6 +14,11 @@ else AC_PATH_ROOT=$(readlink -f "$AC_PATH_APPS/../") fi +case $AC_PATH_ROOT in + /*) AC_PATH_ROOT=$AC_PATH_ROOT;; + *) AC_PATH_ROOT=$PWD/$AC_PATH_ROOT;; +esac + AC_PATH_CONF="$AC_PATH_ROOT/conf" AC_PATH_MODULES="$AC_PATH_ROOT/modules" diff --git a/apps/bash_shared/deno.sh b/apps/bash_shared/deno.sh index 9403615fc1..68086acf51 100644 --- a/apps/bash_shared/deno.sh +++ b/apps/bash_shared/deno.sh @@ -14,7 +14,8 @@ function denoInstall() { } function denoCmd() { - (cd "$AC_PATH_ROOT" ; ./deps/deno/bin/deno "$@") + [[ "$OSTYPE" = "msys" ]] && DENOEXEC="./deps/deno/bin/deno.exe" || DENOEXEC="./deps/deno/bin/deno" + (cd "$AC_PATH_ROOT" ; $DENOEXEC "$@") } function denoRunFile() { diff --git a/deps/deno/bin/.gitignore b/deps/deno/bin/.gitignore index a8df2a91b2..6f4f877a95 100644 --- a/deps/deno/bin/.gitignore +++ b/deps/deno/bin/.gitignore @@ -1 +1 @@ -deno \ No newline at end of file +deno*