Skip to content

Commit c79e882

Browse files
authored
Fix build on macOS (#5044)
* remove ‘m’ flag * update regex * update regex
1 parent d92c0b0 commit c79e882

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ cp node_modules/@openpgp/web-stream-tools/lib/*.js $OUTDIR/lib/streams
7373
STREAMS_REGEX="s/'\.\/(streams|util|writer|reader|node-conversions)'/'\.\/\1\.js'/g"
7474
STREAMS_FILES=$OUTDIR/lib/streams/*
7575
# patch isUint8Array until https://github.com/openpgpjs/web-stream-tools/pull/23 is resolved
76-
ISUINT8ARRAY_REGEX="s/^(\s*)return\x20Uint8Array\.prototype\.isPrototypeOf\(input\);/\1return\x20Uint8Array\.prototype\.isPrototypeOf\(input\)\x20\|\|\x20globalThis\.Uint8Array\.prototype\.isPrototypeOf\(input\);/mg"
76+
ISUINT8ARRAY_REGEX="s/(\s*)return\x20Uint8Array\.prototype\.isPrototypeOf\(input\);/\1return\x20Uint8Array\.prototype\.isPrototypeOf\(input\)\x20\|\|\x20globalThis\.Uint8Array\.prototype\.isPrototypeOf\(input\);/g"
7777
OPENPGP_FILE=$OUTDIR/lib/openpgp.js
7878
if [[ "$OSTYPE" =~ ^darwin ]]; then # macOS needs additional parameter for backup files
7979
sed -i '' -E $STREAMS_REGEX $STREAMS_FILES

0 commit comments

Comments
 (0)