You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove the workaround to enable macOS launcher #5262
Looks like a permissions issue to me. Is the account doing the build (owner) the same as who created the inital file structure. I could rewrite it so it builds the app in a user space temp folder such as TMPDIR to avoid conflicts.
Aditya Patwardhan (@adityapatwardhan) so I found out what is going on. When the the installation of PowerShell occurs it is actually recognizing the app that exists in the packaging folder and updating the copy there tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app instead of installing it to /Applications as you would think. Since it gets installed as root:wheel 755 you lose access to the files.
The behavior may seem like madness but it makes sense as apps can be installed pretty much anywhere you like. Being able automatically find these instances is beneficial.
This issue only occurs on a machine with build on it. I verified that a vanilla High Sierra does not have this issue with just the installation from .pkg.
I'm afraid moving it to different temporary folder will probably not work as it will get picked up there too. My intuition is one the the identifiers in Info.plist is triggering its pickup. Removing the tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app folder prior to installation does fix the issue.
Possible solutions
Remove the macOS app folder just after fpm runs here. Not the best but maybe good enough for getting past CI.
Have packaging build the macOS app procedurally as it is simple a few files and folders then remove the folder after packaging, same as in 1. This has the advantage of not having the folder structure and files in the repo directly as they can be generated at will.
Figure out what is triggering the capture of the build staging launcher and make a change to the plist and/or structure to prevent if from being picked up post fpm.
Also for anyone wanting to try to repro this to uninstall PowerShell from macOS you should be using the following. I will get documentation updated soon with the below.
Greg Zimmerman (@thezim) If you enable travis-ci or your branch, it will attempt to build the package each time you attempt to push. I don't have any preference between 1 & 2. Although, we are getting close to release. We should probably be looking for a simple solution. It seems to me 1 is simpler (if it works.)
After digging in to it option 1 wasn't really viable because subsequent package builds would fail as the structure it needs would be gone. Option 2 was the most work so I first tried Option 3 and was able to get it working. PR #5291 has been submitted.
Activity
[-]Remove the workaround to enbable macOS launcher[/-][+]Remove the workaround to enable macOS launcher[/+]thezim commentedon Oct 29, 2017
Looks like a permissions issue to me. Is the account doing the build (owner) the same as who created the inital file structure. I could rewrite it so it builds the app in a user space temp folder such as
TMPDIRto avoid conflicts.adityapatwardhan commentedon Oct 30, 2017
Greg Zimmerman (@thezim) yes it is the same account. It would be great if you could send a PR to resolve this.
thezim commentedon Oct 31, 2017
Issue
Aditya Patwardhan (@adityapatwardhan) so I found out what is going on. When the the installation of PowerShell occurs it is actually recognizing the app that exists in the packaging folder and updating the copy there
tools/packaging/macos/launcher/ROOT/Applications/PowerShell.appinstead of installing it to/Applicationsas you would think. Since it gets installed as root:wheel 755 you lose access to the files.The behavior may seem like madness but it makes sense as apps can be installed pretty much anywhere you like. Being able automatically find these instances is beneficial.
This issue only occurs on a machine with build on it. I verified that a vanilla High Sierra does not have this issue with just the installation from .pkg.
I'm afraid moving it to different temporary folder will probably not work as it will get picked up there too. My intuition is one the the identifiers in Info.plist is triggering its pickup. Removing the
tools/packaging/macos/launcher/ROOT/Applications/PowerShell.appfolder prior to installation does fix the issue.Possible solutions
fpmruns here. Not the best but maybe good enough for getting past CI.fpm.Also for anyone wanting to try to repro this to uninstall PowerShell from macOS you should be using the following. I will get documentation updated soon with the below.
/cc Travis Plunk (@TravisEz13)
TravisEz13 commentedon Oct 31, 2017
Greg Zimmerman (@thezim) If you enable travis-ci or your branch, it will attempt to build the package each time you attempt to push. I don't have any preference between 1 & 2. Although, we are getting close to release. We should probably be looking for a simple solution. It seems to me 1 is simpler (if it works.)
thezim commentedon Nov 1, 2017
After digging in to it option 1 wasn't really viable because subsequent package builds would fail as the structure it needs would be gone. Option 2 was the most work so I first tried Option 3 and was able to get it working. PR #5291 has been submitted.
/cc Aditya Patwardhan (@adityapatwardhan)
Fix macOS launcher app to allow release and preview versions. (#7306)
Fix macOS launcher app to allow release and preview versions. (PowerS…