Skip to content

Commit 22b66fa

Browse files
committed
fix: CI issue
1 parent d453154 commit 22b66fa

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

contracts/default.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@
5252
echo "error: could not find scripts/abigen.ts under $root (run from the contracts directory, repo root, or set your cwd there)" >&2
5353
exit 1
5454
fi
55-
exec node --require ts-node/register/transpile-only "$root/scripts/abigen.ts" "$@"
55+
56+
# Resolve any manifest-path argument before changing directories below.
57+
args=()
58+
for arg in "$@"; do
59+
args+=("$(realpath "$arg")")
60+
done
61+
62+
# ts-node resolves tsconfig.json relative to the process cwd, not the
63+
# script's own location, so cd there first (repo root has no
64+
# tsconfig.json, which would otherwise fall back to ts-node's bundled
65+
# default config and fail with TS5109 on this TypeScript version).
66+
cd "$root"
67+
exec node --require ts-node/register/transpile-only scripts/abigen.ts "''${args[@]}"
5668
'';
5769
};
5870

0 commit comments

Comments
 (0)