Skip to content

Commit d8cd48e

Browse files
authored
Treat cygwin as Windows. (#63)
1 parent c23bdcd commit d8cd48e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

hooks/pre-command

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
set -euo pipefail
33
shopt -s extglob
44

5+
is_windows() { [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; }
6+
57

68
## Set some global configuration options, but allow users to override them
79

@@ -31,7 +33,7 @@ fi
3133
if [[ "${BUILDKITE_PLUGIN_JULIA_ISOLATED_DEPOT:-true}" == "true" ]]; then
3234
# Export `JULIA_DEPOT_PATH` so that future julia invocations use this depot
3335
export DEPOT_DIR="${CACHE_DIR}/depots/${BUILDKITE_PIPELINE_ID}"
34-
if [[ "$OSTYPE" == "msys" ]]; then
36+
if is_windows; then
3537
export JULIA_DEPOT_PATH="${DEPOT_DIR};"
3638
else
3739
export JULIA_DEPOT_PATH="${DEPOT_DIR}:"
@@ -196,7 +198,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
196198
;;
197199
esac
198200
ext="tar.gz"
199-
elif [[ "$OSTYPE" == "msys" ]]; then
201+
elif is_windows; then
200202
os="winnt"
201203
nightly_os="winnt"
202204
case "$ARCH" in
@@ -312,7 +314,7 @@ if [[ "${BUILDKITE_PLUGIN_JULIA_UPDATE_REGISTRY:-true}" == "true" ]]; then
312314
end'
313315
fi
314316

315-
if [[ "${OSTYPE}" != "msys" ]]; then
317+
if ! is_windows; then
316318
# Export `PATH` such that this `julia` is the first one other plugins find
317319
export PATH=${unpack_dest}/bin:"$PATH"
318320
else

0 commit comments

Comments
 (0)