Skip to content

Commit d32bd49

Browse files
author
Yutaro-B18016
authored
Merge pull request #10 from Yutaro-B18016:Ask-for-sudo-if-not-running-as-root--Arch-Linux-
Ask for sudo if not running as root [Arch Linux]
2 parents 58e4894 + 6f5832f commit d32bd49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/install-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#
88

99
if [ "$(id -u)" -ne 0 ]; then
10-
echo 'This script must be run with root privileges' >&2
11-
exit 1
10+
#rerun the script with root privileges
11+
exec sudo "$0" "$@"
1212
fi
1313

1414
# Use Qi to check for exact package name

0 commit comments

Comments
 (0)