Skip to content

Commit a8739aa

Browse files
authored
Update wrap_chrome_binary
1 parent 5b46a36 commit a8739aa

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

NodeChrome/wrap_chrome_binary

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
#!/bin/bash
22

3-
WRAPPER_PATH=$(readlink -f /usr/bin/google-chrome)
3+
WRAPPER_PATH=$(readlink -f /usr/bin/microsoft-edge)
44
BASE_PATH="$WRAPPER_PATH-base"
55
mv "$WRAPPER_PATH" "$BASE_PATH"
66

7+
# Debian/Ubuntu seems to not respect --lang, it instead needs to be a LANGUAGE environment var
8+
# See: https://stackoverflow.com/a/41893197/359999
9+
for var in "$@"; do
10+
if [[ $var == --lang=* ]]; then
11+
LANGUAGE=${var//--lang=}
12+
fi
13+
done
14+
715
cat > "$WRAPPER_PATH" <<_EOF
816
#!/bin/bash
917
1018
# umask 002 ensures default permissions of files are 664 (rw-rw-r--) and directories are 775 (rwxrwxr-x).
1119
umask 002
1220
21+
# Set language environment variable
22+
export LANGUAGE="$LANGUAGE"
23+
1324
# Note: exec -a below is a bashism.
1425
exec -a "\$0" "$BASE_PATH" --no-sandbox "\$@"
1526
_EOF
1627
chmod +x "$WRAPPER_PATH"
17-
18-
# Debian/Ubuntu seems to not respect --lang, it instead needs to be a LANGUAGE environment var
19-
# See: https://stackoverflow.com/a/41893197/359999
20-
for var in "$@"; do
21-
if [[ $var == --lang=* ]]; then
22-
export LANGUAGE=${var//--lang=}
23-
fi
24-
done

0 commit comments

Comments
 (0)