summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2021-04-23 14:35:41 +0200
committerGitHub <noreply@github.com>2021-04-23 14:35:41 +0200
commit970d371442b450782f3fcc4c34e1afe0f848672d (patch)
tree8fe89e414f5f39210a5e74e56cb84639344a4ed1
parentc95d1f72a879b9b0c430431325a9d3b92d46604b (diff)
fix(bash): bash errors on windows (#5406)
-rwxr-xr-xacore.sh3
-rw-r--r--apps/bash_shared/defines.sh5
-rw-r--r--apps/bash_shared/deno.sh3
-rw-r--r--deps/deno/bin/.gitignore2
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*