Skip to content

Commit

Permalink
Use simpler symlink path
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky committed Oct 26, 2024
1 parent 236a1e5 commit 881a725
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ echo "script_dir: $script_dir"
# when the issue above is resolved
tsx_shim="$script_dir/../node_modules/.bin/tsx"
exec_command=$(awk '/^else$/{flag=1;next}/^fi$/{flag=0}flag' "$tsx_shim" | grep 'exec node')
cli_path=$(echo "$exec_command" | sed -E 's/^[[:space:]]*exec node[[:space:]]+"([^"]+)".*/\1/')
cli_path="${cli_path/\$basedir/$script_dir}"
pnpm_bin_global="$(pnpm bin --global)"
echo "pnpm_bin_global: $pnpm_bin_global"
cli_path="${cli_path/$pnpm_bin_global\//$pnpm_bin_global\/global\/5\/.pnpm\/}"
echo "cli_path: $cli_path"
cli_path=$(echo "$exec_command" | sed -E 's/^[[:space:]]*exec node[[:space:]]+"[^"]+(node_modules/tsx/[^"]+)".*/\1/')
cli_path="$(pnpm bin --global)/global/5/.pnpm/$cli_path"
# # pnpm_bin_global="$(pnpm bin --global)/global/5/.pnpm/$cli_path"
# # echo "pnpm_bin_global: $pnpm_bin_global"
# cli_path="${cli_path/$pnpm_bin_global\//$pnpm_bin_global\/global\/5\/.pnpm\/}"
# echo "cli_path: $cli_path"

node "$cli_path" "$script_dir/../src/index.ts"

0 comments on commit 881a725

Please sign in to comment.