Skip to content

Commit db4a155

Browse files
author
Daniel Ruthardt
committed
🐛 Fix quoting issue found thanks to testing
1 parent 2bad3f3 commit db4a155

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libs/file/copy_owners

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ function file::copy_owners() {
4848
local user; user=$(stat -c '%U' "$source")
4949
local group; group=$(stat -c '%G' "$source")
5050

51-
[[ "$recursive" == "true" ]] && local options="-R"
52-
sudo chown "${options:-}" "$user:$group" "$destination"
51+
local command="sudo chown"
52+
if [[ "$recursive" == "true" ]]; then
53+
command+=" -R"
54+
fi
55+
56+
$command "$user:$group" "$destination"
5357
}

0 commit comments

Comments
 (0)