Fix owner/group/mode options

This commit is contained in:
Greg Neagle
2024-07-08 22:14:32 -07:00
parent 974089fc0d
commit 62c1e8dfc8
2 changed files with 3 additions and 3 deletions
@@ -124,7 +124,7 @@ struct DragNDropOptions: ParsableArguments {
help: ArgumentHelp("Alternate name for which the item should be copied as. Specifying this option also alters the corresponding 'installs' item's path with the provided name.", valueName: "name"))
var destitemname: String? = nil
@Option(name: [.customShort("o"), .customLong("owner")],
@Option(name: [.customShort("o"), .customLong("owner"), .customLong("user")],
help: "Sets the owner of the copied item. The owner may be either a UID number or a UNIX short name. The owner will be set recursively on the item.")
var user: String? = nil
+2 -2
View File
@@ -206,10 +206,10 @@ func createPkgInfoForDragNDrop(_ mountpoint: String, options: PkginfoOptions) th
itemsToCopyItem["user"] = user
}
if let group = options.dmg.group {
itemsToCopyItem["user"] = group
itemsToCopyItem["group"] = group
}
if let mode = options.dmg.mode {
itemsToCopyItem["user"] = mode
itemsToCopyItem["mode"] = mode
}
info["items_to_copy"] = [itemsToCopyItem]
info["uninstallable"] = true