We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bad3f3 commit db4a155Copy full SHA for db4a155
libs/file/copy_owners
@@ -48,6 +48,10 @@ function file::copy_owners() {
48
local user; user=$(stat -c '%U' "$source")
49
local group; group=$(stat -c '%G' "$source")
50
51
- [[ "$recursive" == "true" ]] && local options="-R"
52
- sudo chown "${options:-}" "$user:$group" "$destination"
+ local command="sudo chown"
+ if [[ "$recursive" == "true" ]]; then
53
+ command+=" -R"
54
+ fi
55
+
56
+ $command "$user:$group" "$destination"
57
}
0 commit comments