Fixed SC2164: Use 'cd ... || exit' in case cd fails.

This commit is contained in:
Teal Dulcet
2024-04-03 09:21:34 -04:00
committed by Joshua Tauberer
parent 30c4681e80
commit 33559bb844
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ EOF
# Execute Nextcloud's setup step, which creates the Nextcloud sqlite database.
# It also wipes it if it exists. And it updates config.php with database
# settings and deletes the autoconfig.php file.
(cd /usr/local/lib/owncloud; sudo -u www-data php"$PHP_VER" /usr/local/lib/owncloud/index.php;)
(cd /usr/local/lib/owncloud || exit; sudo -u www-data php"$PHP_VER" /usr/local/lib/owncloud/index.php;)
fi
# Update config.php.