Address an issue when package_path is defined in a pkginfo where an incomplete path to the package was passwd to /usr/sbin/installer

This commit is contained in:
Greg Neagle
2025-07-08 16:45:43 -07:00
parent 8ae093973f
commit 69f4e741c0
@@ -148,7 +148,7 @@ func handleApplePackageInstall(pkginfo: PlistDict, itemPath: String) async -> (I
// or the actual pkg is not at the root of the DMG
let fullPkgPath = (mountpoint as NSString).appendingPathComponent(pkgPath)
if pathExists(fullPkgPath) {
let (retcode, needToRestart) = await install(pkgPath, options: pkginfo)
let (retcode, needToRestart) = await install(fullPkgPath, options: pkginfo)
return (retcode, needToRestart || requiresRestart(pkginfo))
} else {
display.error("Did not find \(pkgPath) on disk image \(dmgName)")