Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAppPath mdfind command returning multiple paths - this causes packer to fail #63

Open
FredericoC opened this issue Nov 11, 2022 · 0 comments
Labels

Comments

@FredericoC
Copy link

Overview of the Issue

I was getting the following error;

Build 'parallels-iso.linux-ubuntu-server' errored after 472 milliseconds 110 microseconds: Couldn't find Parallels Tools for the 'lin-arm' flavor!...

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;

~/Projects$ mdfind kMDItemCFBundleIdentifier == com.parallels.desktop.console
/Applications/Parallels Desktop.app
/Volumes/CarbonCopy Backup/Applications/Parallels Desktop.app

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant