mirror of
https://github.com/zulip/zulip.git
synced 2026-06-03 21:01:43 +08:00
tooling: Enable strict shell mode in selected scripts.
Add strict shell options (set -euo pipefail / set -eu) to a small set of simple shell scripts that do not rely on unset variables or pipeline exit-code masking. Each script was reviewed line by line to confirm strict mode is safe and that stopping immediately on errors is the correct behavior for these scripts. Fixes part of #20748.
This commit is contained in:
parent
279c72de3a
commit
19e9a4e44b
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
symlink_with_backup() {
|
||||
if [ -e "$2" ]; then
|
||||
# If the user is setting up our automatic certbot-management on a
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
service nginx reload
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
ZULIP_PATH="$(dirname "$0")/.."
|
||||
exec "$ZULIP_PATH/node_modules/.bin/tsc" --project "$ZULIP_PATH" "$@"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if ! [ -d ".git/hooks/" ]; then
|
||||
echo "Error: Could not find .git/hooks directory"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user