Fix incorrect sudo call

This commit is contained in:
Manuel Thalmann 2023-04-03 00:15:09 +02:00
parent 542174a2af
commit 63c368fa85

View file

@ -7,11 +7,12 @@ EXTENSION_POLICY_DIR="${EXTENSION_POLICY_DIR}";
# Elevate script
if [ ! "$UID" -eq 0 ]
then
EXTENSION_NAME="${EXTENSION_NAME}" \
UNPACKED_EXTENSION="${UNPACKED_EXTENSION}" \
EXTENSION_DIR="${EXTENSION_DIR}" \
EXTENSION_POLICY_DIR="${EXTENSION_POLICY_DIR}" \
sudo bash "$BASH_SOURCE" "$USER";
sudo \
EXTENSION_NAME="${EXTENSION_NAME}" \
UNPACKED_EXTENSION="${UNPACKED_EXTENSION}" \
EXTENSION_DIR="${EXTENSION_DIR}" \
EXTENSION_POLICY_DIR="${EXTENSION_POLICY_DIR}" \
bash "$BASH_SOURCE" "$USER";
else
keyFile="$UNPACKED_EXTENSION.pem";
extensionFile="$UNPACKED_EXTENSION.crx";