-
Notifications
You must be signed in to change notification settings - Fork 43
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
macOS installer .pkg file does not support relocation #271
Comments
The The pkg statically encodes static paths relative to the volume for the files that are extracted on installation. By default, they go into Swiftly could do a better job of cleaning up the files and directory left over from the first stage though. It does tend to leave the license file around, and otherwise empty directories and I think that's an actionable part of this issue. If everything ends up in the place that's specified, leaving nothing in the original place, does that work? In terms of using swiftly in a CI environment, there is a document describing how to accomplish that on both macOS and Linux: https://swiftpackageindex.com/swiftlang/swiftly/1.0.0/documentation/swiftlydocs/automated-install |
$ tree --noreport ~/.swiftly
/Users/redacted/.swiftly
├── bin
└── share
└── doc
└── swiftly
└── license
└── LICENSE.txt |
As I hinted at in #277, I would prefer if I had full control over the location of every file that was installed and managed by swiftly. If there are tools that require extra help to find toolchains not installed in "standard locations", I would rather that be a bug report to the tool, and a warning in the documentation that if I go play games with default paths tools might break. Anything is better than forcing me to put files in a dotfiles directory under my user home. On linux this seems to almost be there, because $XDG_DATA_HOME is respected. But a more custom configuration knob that works on all supported platforms would be preferred. |
The documentation at https://www.swift.org/install/macos/swiftly/ claims that the same environment variables as Linux can affect the install location.
However, as far as I can tell, no matter what the initial
swiftly
file will be placed at the default location of$HOME/.swiftly/bin/swiftly
, and license will be placed in$HOME/.swiftly/share/doc/swiftly/license/LICENSE.txt
.The
.pkg
file format doesn't seem to support installation at a different location. So I'm really not quite sure why it was picked as the distribution method for macOS. I imagine that many developers are like me and get very annoyed with tools when they decide that placing arbitrary files dotfiles/dotdirs in $HOME is a reasonable thing to do to my system.I'd like to ask the swiftly team to just provide a simple tarball like on Linux, or improve the installer .pkg file to actually allow me to specify exactly where any and all files end up located. I don't want to have to clean up my home directory after running this installer, and a
.pkg
file doesn't seem particularly CI-friendly.The text was updated successfully, but these errors were encountered: