Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [: /bin: unexpected operator on POSIX #3045

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-chairs-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-hive/cli': patch
---

Fix [: /bin: unexpected operator on POSIX
6 changes: 3 additions & 3 deletions patches/oclif@3.17.1.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/lib/tarballs/bin.js b/lib/tarballs/bin.js
index 8301c7be4c3101de9caf1c1b127cf1f940a1706c..402c146592628c6181576d01988e2f4e3bb654db 100644
index 8301c7be4c3101de9caf1c1b127cf1f940a1706c..e7d955d29ce3d002a260ef7f4a1355fcdc95e018 100644
--- a/lib/tarballs/bin.js
+++ b/lib/tarballs/bin.js
@@ -7,85 +7,65 @@ const node_child_process_1 = require("node:child_process");
Expand Down Expand Up @@ -59,8 +59,8 @@ index 8301c7be4c3101de9caf1c1b127cf1f940a1706c..402c146592628c6181576d01988e2f4e
SOURCE="\$( readlink "\$SOURCE" )"
# If \$SOURCE was a relative symlink (so no "/" as prefix, need to resolve it relative to the symlink base directory
- [[ \$SOURCE != /* ]] && SOURCE="\$DIR/\$SOURCE"
+ if [ "\$SOURCE" != /* ]; then
+ SOURCE="\$DIR/\$SOURCE"
+ if echo "\$SOURCE" | grep -q '^/*\$'; then
+ SOURCE="\$DIR/\$SOURCE"
+ fi
done
DIR="\$( cd -P "\$( dirname "\$SOURCE" )" && pwd )"
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading