From 14687e434abb6178b1891d472d8c312e8641c226 Mon Sep 17 00:00:00 2001 From: Eduard Filip Date: Wed, 8 Mar 2023 12:17:03 +0100 Subject: [PATCH] Enable installing the CLI on MacOS runners without sudo privileges (#32) --- entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index c9dd1c8..d0464ad 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -51,7 +51,9 @@ install_op_cli() { unzip -od "$OP_INSTALL_DIR" op.zip && rm op.zip elif [[ "$OSTYPE" == "darwin"* ]]; then curl -sSfLo op.pkg "https://cache.agilebits.com/dist/1P/op2/pkg/v2.10.0-beta.02/op_apple_universal_v2.10.0-beta.02.pkg" - sudo installer -pkg op.pkg -target "$OP_INSTALL_DIR" && rm op.pkg + pkgutil --expand op.pkg temp-pkg + tar -xvf temp-pkg/op.pkg/Payload -C "$OP_INSTALL_DIR" + rm -rf temp-pkg && rm op.pkg fi }