getAppPath
mdfind
command returning multiple paths - this causes packer to fail
#63
Labels
getAppPath
mdfind
command returning multiple paths - this causes packer to fail
#63
Overview of the Issue
I was getting the following error;
Parallels SDK was installed and I could see the iso files there, so I dug further. Turns out I have two "Parallels Desktop" folders due to a "Carbon Copy Cloner" backup which is mounted on another volume. So the output of my
mdfind
command is as follows;Since the
getAppPath
function simply returns the command output, it puts the two paths in the same string and the build fails straight away because it can't find the tools iso. Unmounting the carbon copy volume fixes the issue.Since it's so unlikely to happen (and if it does it's likely because of a duplicate/backup like in my case), I've played around with simply changing it to;
pathOutput := strings.TrimSpace(strings.Split(stdout.String(), "\n")[0])
However did not get to test it since Go is not my normal dev environment and I couldn't figure out how to install custom plugins (I got to compile it but couldn't install it).
Reproduction Steps
Use Carbon Copy Cloner (can download a trial) to backup the Parallels Desktop folder to another volume. Run
packer build
.Plugin and Packer version
Packer v1.8.4
Simplified Packer Buildfile
Not relevant
Operating system and Environment details
macOS, darwin_arm64
Log Fragments and crash.log files
Not relevant
The text was updated successfully, but these errors were encountered: