Compare commits
No commits in common. "ff551a9a82a71d76dfb0d9927d113f0a1d05764d" and "5d289cf5a8d3bd61777e27e4cffe411b92c088e3" have entirely different histories.
ff551a9a82
...
5d289cf5a8
@ -4,25 +4,6 @@ set -euo pipefail
|
||||
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
cd "$root"
|
||||
|
||||
# `core.symlinks=false` checkouts materialize the tracked `dsh/bundle/hooks`
|
||||
# symlink as a regular file containing "../../hooks". Repair it before the
|
||||
# tests, otherwise five guard tests fail with BLOCKED instead of testing.
|
||||
ensure_bundle_hooks() {
|
||||
local link="$root/dsh/bundle/hooks"
|
||||
[ -L "$link" ] && return 0 # symlink (or a repaired one)
|
||||
[ -d "$link" ] && return 0 # published bundle: a real copy of hooks/
|
||||
if [ -f "$link" ] && [ "$(cat "$link")" = "../../hooks" ]; then
|
||||
rm -f "$link"
|
||||
ln -s ../../hooks "$link"
|
||||
echo "repaired dsh/bundle/hooks -> ../../hooks (core.symlinks=false checkout)"
|
||||
return 0
|
||||
fi
|
||||
echo "FAIL: dsh/bundle/hooks is neither a symlink to ../../hooks nor a copy of hooks/" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
ensure_bundle_hooks
|
||||
|
||||
for f in dsh/bundle/index.js dsh/bundle/command-role.js dsh/bundle/lib/*.js dsh/tests/*.mjs; do
|
||||
node --check "$f"
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user