aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-10-01 16:47:39 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-10-01 16:47:39 +1300
commit4cafcd241a2ff017b3a0983fb4b429a0e4daa2c4 (patch)
tree72e3601edbde257fe5fee2d877e6a7a1f0018bba /bin
parentAdd sue(8) (diff)
downloaddotfiles-4cafcd241a2ff017b3a0983fb4b429a0e4daa2c4.tar.gz
dotfiles-4cafcd241a2ff017b3a0983fb4b429a0e4daa2c4.zip
Whoops, forgot my option terminators
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sue4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sue b/bin/sue
index cd20fa5c..3fb36a4c 100755
--- a/bin/sue
+++ b/bin/sue
@@ -42,7 +42,7 @@ user=
for file in "${files[@]}" ; do
# Use stat(1) to get the file owner
- if ! file_owner=$(stat -c %U "$file") ; then
+ if ! file_owner=$(stat -c %U -- "$file") ; then
printf '%s: Failed to run stat(1) on file %s\n' \
"$self" "$file" >&2
exit 1
@@ -63,5 +63,5 @@ done
# If we got this far, there's at least one file and all the files are owned by
# the same user; we can safely edit them
-exec sudoedit -u "$user" "${files[@]}"
+exec sudoedit -u "$user" -- "${files[@]}"