swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.48k stars 10.35k forks source link

[SR-7325] Some macOS toolchain snapshot packages require admin privileges #49873

Open tkrajacic opened 6 years ago

tkrajacic commented 6 years ago
Previous ID SR-7325
Radar None
Original Reporter @tkrajacic
Type Bug

Attachment: Download

Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Project Infrastructure | |Labels | Bug | |Assignee | @shahmishal | |Priority | Medium | Watchers: @shahmishal md5: 00314057881c8b10c329bb45ea0922ed

Issue Description:

When downloading snapshots from https://swift.org/download/ the installers differ every now and then.

The installer for org.swift.3020180330a let me install “For this user only” and hence the toolchain ended up in ~/Library/Developer/Toolchains/ while the installer for org.swift.4220180331a didn’t even give me that choice and asked for my admin password right away. Therefore the org.swift.4220180331a toolchain now resides in /Library/Developer/Toolchains

shahmishal commented 6 years ago

@tkrajacic How are you installing the toolchain? Command line or UI?

tkrajacic commented 6 years ago

@shahmishal With the regular UI package installer. I download the packages from swift.org

You know that weird out of place UI tat shows you the "Install for this user only; Install for all users" UI with the very ancient Home icon? Sometimes the installer shows this and lets me choose, sometimes this doesn't come up and asks for a password right away (installing into /Library level)

shahmishal commented 6 years ago

@tkrajacic, when you get to "Installation Type" do you see "Change Install Location..." at the bottom right?

tkrajacic commented 6 years ago

It is weird. I just downloaded the installers again and the following presents:

Sometimes ❗ the installer skips the "Destination Select" after clicking the first "continue", and sometimes it goes there and shows the select destination list.

When I download the `org.swift.3020180330a` again it always shows me the destination selection.

When I downloaded the `org.swift.4220180331a` again, I first double-clicked the icon in Safari's download list and also the destination list was presented after the first continue. I quit the installer and opened it up again from the Finder. Now it always skips the destination. The `org.swift.3020180330a` still always shows it, while the `org.swift.4220180331a` now never does (I couldn't get it to do it again like when started directly from Safari – if that even mattered and wasn't coincidence)

But yes, I do see that button…

shahmishal commented 6 years ago

Is this still an issue?

tkrajacic commented 6 years ago

Yes, this is still an issue. By default the installers skip the location selection and want to install globally and request the user's password. Just tried it with the master and the 4.2 toolchain.