Skip to content

Commit

Permalink
Revert "Fixed SC2091: Remove surrounding $() to avoid executing outpu…
Browse files Browse the repository at this point in the history
…t." and fix it another way

This reverts commit 67bcaea. The sub-shell was required to prevent the updated umask from affecting later steps. It broke the permissions of the fetched assets for the control panel: https://discourse.mailinabox.email/t/admin-panel-broken-after-restore-upgrade/12112/24

Instead, the `$()` is replaced with just `()` to create a subshell without executing its output.
  • Loading branch information
JoshData committed Jul 23, 2024
1 parent 2ae8cd5 commit 60a2b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/management.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ hide_output $venv/bin/pip install --upgrade \
# Create a backup directory and a random key for encrypting backups.
mkdir -p "$STORAGE_ROOT/backup"
if [ ! -f "$STORAGE_ROOT/backup/secret_key.txt" ]; then
umask 077; openssl rand -base64 2048 > "$STORAGE_ROOT/backup/secret_key.txt"
(umask 077; openssl rand -base64 2048 > "$STORAGE_ROOT/backup/secret_key.txt")
fi


Expand Down

0 comments on commit 60a2b58

Please sign in to comment.