Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tooling: Enable strict shell mode in selected scripts.

Arun Kushwaha19e9a4e44bf5
diff --git a/puppet/zulip/files/letsencrypt/020-symlink.sh b/puppet/zulip/files/letsencrypt/020-symlink.sh
index 8a46afe7ca8..9b0794b53ca 100755
--- a/puppet/zulip/files/letsencrypt/020-symlink.sh
+++ b/puppet/zulip/files/letsencrypt/020-symlink.sh
@@ -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
diff --git a/puppet/zulip/files/letsencrypt/050-nginx.sh b/puppet/zulip/files/letsencrypt/050-nginx.sh
index cf117c05231..4f3c30d9a1b 100755
--- a/puppet/zulip/files/letsencrypt/050-nginx.sh
+++ b/puppet/zulip/files/letsencrypt/050-nginx.sh
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-
+set -euo pipefail
service nginx reload
diff --git a/tools/run-tsc b/tools/run-tsc
index 8d0f6d5bcb4..8644df6c2f0 100755
--- a/tools/run-tsc
+++ b/tools/run-tsc
@@ -1,3 +1,4 @@
#!/bin/sh
+set -eu
ZULIP_PATH="$(dirname "$0")/.."
exec "$ZULIP_PATH/node_modules/.bin/tsc" --project "$ZULIP_PATH" "$@"
diff --git a/tools/setup-git-repo b/tools/setup-git-repo
index 7493d14106c..e0dfe402865 100755
--- a/tools/setup-git-repo
+++ b/tools/setup-git-repo
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+set -euo pipefail
if ! [ -d ".git/hooks/" ]; then
echo "Error: Could not find .git/hooks directory"