diff --git a/scripts/dev-host.sh b/scripts/dev-host.sh index 7d37777..a6916ff 100755 --- a/scripts/dev-host.sh +++ b/scripts/dev-host.sh @@ -34,7 +34,10 @@ port_owner() { } require_environment() { - [ -d "$HOST_DIR/.git" ] || { echo "cloudcli/ is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; } + # -e, not -d: in a submodule checkout .git is a *file* pointing at + # ../.git/modules/cloudcli. It is only a directory when the fork was cloned + # into place by hand. + [ -e "$HOST_DIR/.git" ] || { echo "cloudcli/ is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; } [ -d "$HOST_DIR/node_modules" ] || { echo "cloudcli/node_modules is missing — run ./scripts/bootstrap.sh" >&2; exit 1; } # The server needs these three compiled; npm >= 12 blocks install scripts by diff --git a/scripts/export-patches.sh b/scripts/export-patches.sh index 270bc86..cf60d99 100755 --- a/scripts/export-patches.sh +++ b/scripts/export-patches.sh @@ -20,7 +20,8 @@ BRANCHES=( "feat/plugin-sidebar-surface:0003-feat-plugin-sidebar-surface.patch" ) -[ -d "$SRC/.git" ] || { echo "cloudcli/ submodule is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; } +# -e, not -d: in a submodule checkout .git is a file, not a directory. +[ -e "$SRC/.git" ] || { echo "cloudcli/ submodule is not initialised — run ./scripts/bootstrap.sh" >&2; exit 1; } [ -d "$OUT" ] || { echo "plugin-taskwork/patches/ is missing — run ./scripts/bootstrap.sh" >&2; exit 1; } git -C "$SRC" rev-parse --verify --quiet "$BASE_TAG^{commit}" >/dev/null \