File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ strip_quarantine() {
192192
193193download_binary () {
194194 curl -R -z " $BINARY_ZIP_PATH " -L " https://api.browserstack.com/sdk/v1/download_cli?os=${OS} &os_arch=${ARCH} " -o " $BINARY_ZIP_PATH "
195- bsdtar -xvf " $BINARY_ZIP_PATH " -O > " $BINARY_PATH " && chmod 0775 " $BINARY_PATH " && strip_quarantine
195+ bsdtar -xvf " $BINARY_ZIP_PATH " -O > " $BINARY_PATH " && chmod 0755 " $BINARY_PATH " && strip_quarantine
196196}
197197
198198# Self-update is opt-in (DEVA11Y-475): it runs only via the explicit `self-update`
Original file line number Diff line number Diff line change 1- 90218e86363718406766c63830bac54f4c390030df0bc702fb95b3f032843545 cli.sh
1+ 2dc6f5c62109ff1ae5185c417ea3896e4bb9f326ce91764e87161d1d27f976fb cli.sh
Original file line number Diff line number Diff line change 131131 }
132132 trap cleanup EXIT
133133
134- # macOS Gatekeeper refuses to run binaries carrying the com.apple.quarantine
135- # attribute unless they are Developer ID signed and notarized. Some managed
136- # environments (MDM/security tooling) stamp it on network-written files, which
137- # blocks the SPM plugin's cached CLI with no "Allow Anyway" option. Strip it
138- # from any cached binary. No-op off macOS / when the cache or attr is absent.
139- # The plugin runs below under `env -i`, which drops XDG_CACHE_HOME, so it always
140- # resolves its cache to $HOME/.cache (see Plugins/.../BrowserStackAccessibilityLint.swift).
141- # Mirror that here rather than the outer shell's XDG_CACHE_HOME, or the strip
142- # would miss the plugin's real binary when that var is set to a custom path.
143- if [[ " $( uname -s) " == " Darwin" ]] && command -v xattr > /dev/null 2>&1 ; then
144- cli_cache=" $HOME /.cache/browserstack/devtools/spm-plugin"
145- [ -d " $cli_cache " ] && find " $cli_cache " -type f -name ' browserstack-cli' \
146- -exec xattr -d com.apple.quarantine {} \; 2> /dev/null || true
147- fi
148-
149134 if [[ -z " $EXTRA_ARGS " ]]; then
150135 EXTRA_ARGS=" --include **/*.swift --include **/*.xib --include **/*.storyboard"
151136 fi
Original file line number Diff line number Diff line change 1- 0559b6ab17f8cceb44a5defe9a88b5dcd54eaa5a72e7a4f7b5fcee1f13be9be1 spm.sh
1+ b520c458bec538505c9ff9ca75a02ec901597fd66b3c2d951b928e58e58e60da spm.sh
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ strip_quarantine() {
204204
205205download_binary () {
206206 curl -R -z " $BINARY_ZIP_PATH " -L " https://api.browserstack.com/sdk/v1/download_cli?os=${OS} &os_arch=${ARCH} " -o " $BINARY_ZIP_PATH "
207- bsdtar -xvf " $BINARY_ZIP_PATH " -O > " $BINARY_PATH " && chmod 0775 " $BINARY_PATH " && strip_quarantine
207+ bsdtar -xvf " $BINARY_ZIP_PATH " -O > " $BINARY_PATH " && chmod 0755 " $BINARY_PATH " && strip_quarantine
208208}
209209
210210# Self-update is opt-in (DEVA11Y-475): it runs only via the explicit `self-update`
Original file line number Diff line number Diff line change 1- 3e8fe00cebdcb140c4c1f8029c01e96d72cf906e681597317be60bed5e9db2a5 cli.sh
1+ 6a83801b611b3550f46c91daeaeaa8233644d8edd0092e4dfd92098d268e63d4 cli.sh
Original file line number Diff line number Diff line change 144144 }
145145 trap cleanup EXIT
146146
147- # macOS Gatekeeper refuses to run binaries carrying the com.apple.quarantine
148- # attribute unless they are Developer ID signed and notarized. Some managed
149- # environments (MDM/security tooling) stamp it on network-written files, which
150- # blocks the SPM plugin's cached CLI with no "Allow Anyway" option. Strip it
151- # from any cached binary. No-op off macOS / when the cache or attr is absent.
152- # The plugin runs below under `env -i`, which drops XDG_CACHE_HOME, so it always
153- # resolves its cache to $HOME/.cache (see Plugins/.../BrowserStackAccessibilityLint.swift).
154- # Mirror that here rather than the outer shell's XDG_CACHE_HOME, or the strip
155- # would miss the plugin's real binary when that var is set to a custom path.
156- if [[ " $( uname -s) " == " Darwin" ]] && command -v xattr > /dev/null 2>&1 ; then
157- cli_cache=" $HOME /.cache/browserstack/devtools/spm-plugin"
158- [ -d " $cli_cache " ] && find " $cli_cache " -type f -name ' browserstack-cli' \
159- -exec xattr -d com.apple.quarantine {} \; 2> /dev/null || true
160- fi
161-
162147 if [[ -z " $EXTRA_ARGS " ]]; then
163148 EXTRA_ARGS=" --include **/*.swift --include **/*.xib --include **/*.storyboard"
164149 fi
Original file line number Diff line number Diff line change 1- bfc7fbcf9b3df10c4352bc426566a605a1a14554233ed649899cb045efdb5024 spm.sh
1+ 982bbb10bb9bd55428208454a766384fae58c41dacabb1e5b8a74d2366f0d1e7 spm.sh
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ strip_quarantine() {
203203
204204download_binary () {
205205 curl -R -z " $BINARY_ZIP_PATH " -L " https://api.browserstack.com/sdk/v1/download_cli?os=${OS} &os_arch=${ARCH} " -o " $BINARY_ZIP_PATH "
206- bsdtar -xvf " $BINARY_ZIP_PATH " -O > " $BINARY_PATH " && chmod 0775 " $BINARY_PATH " && strip_quarantine
206+ bsdtar -xvf " $BINARY_ZIP_PATH " -O > " $BINARY_PATH " && chmod 0755 " $BINARY_PATH " && strip_quarantine
207207}
208208
209209# Self-update is opt-in (DEVA11Y-475): it runs only via the explicit `self-update`
Original file line number Diff line number Diff line change 1- 713db299874844d7b2a182250864d9703a21c3a7602240ffc413ad40ee7af8e2 cli.sh
1+ 0f6344ba1db459bfa34bde971294215e883649e3107842cb585accf83349c462 cli.sh
You can’t perform that action at this time.
0 commit comments