Revert "Fixed SC2091: Remove surrounding $() to avoid executing output." and fix it another way

This reverts commit 67bcaea71e. 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.
This commit is contained in:
Joshua Tauberer 2024-07-23 06:15:18 -04:00
parent 2ae8cd5713
commit 60a2b58e57
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ hide_output $venv/bin/pip install --upgrade \
# Create a backup directory and a random key for encrypting backups. # Create a backup directory and a random key for encrypting backups.
mkdir -p "$STORAGE_ROOT/backup" mkdir -p "$STORAGE_ROOT/backup"
if [ ! -f "$STORAGE_ROOT/backup/secret_key.txt" ]; then 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 fi