Skip to content

Commit 64dfd59

Browse files
committed
Make sure undefined variables raise an error
This is more safe for the env vars this script references.
1 parent db0809d commit 64dfd59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rails-install-ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22

3+
set -eu
4+
35
if
46
[[ "${USER:-}" == "root" ]]
57
then
68
echo "This script works only with normal user, it wont work with root, please log in as normal user and try again." >&2
79
exit 1
810
fi
911

10-
set -e
11-
1212
echo "Updates packages. Asks for your password."
1313
sudo apt-get update -y
1414

0 commit comments

Comments
 (0)