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
Warning: existing installation of Swift detected at /usr/bin/swift
To ensure swiftly-installed toolchains can be found by the shell, uninstall any existing Swift installation(s).
My existing setup:
% cat ~/.zshrc
...
# Use /Library/Developer/Toolchains/ rather than /usr/bin/swift
#export TOOLCHAINS=swift
export TOOLCHAINS=$(plutil -extract CFBundleIdentifier raw /Library/Developer/Toolchains/swift-latest.xctoolchain/Info.plist)
% which swift
/usr/bin/swift
% swift --version
Apple Swift version 6.0-dev (LLVM 0ad8ad0245d47b4, Swift 5916325b39fe7a5)
Target: arm64-apple-macosx14.0
To use the swiftly installed Swift version, I just had to remove the export TOOLCHAINS= line from my .zshrc.
It would be nice to scan the file for that line to advise clearly what needs to be changed.
After:
% which swift
/Users/brianhenry/Library/Application Support/swiftly/bin/swift
% swift --version
Apple Swift version 5.7.3 (swift-5.7.3-RELEASE)
Target: arm64-apple-macosx14.0
% swiftly list
Installed release toolchains
----------------------------
Swift 5.7.3 (in use)
Installed snapshot toolchains
-----------------------------
if [ -n"`$SHELL -c 'echo $ZSH_VERSION'`" ];thenif [[ $(cat "$HOME/.zshrc"| grep -e "^\s*export TOOLCHAINS=") ]];thenecho"TOOLCHAINS is set in ~/.zshrc"elseecho"TOOLCHAINS is NOT set in ~/.zshrc"fifi
The text was updated successfully, but these errors were encountered:
When I run
swiftly-install.sh
it helpfully says:My existing setup:
To use the swiftly installed Swift version, I just had to remove the
export TOOLCHAINS=
line from my.zshrc
.It would be nice to scan the file for that line to advise clearly what needs to be changed.
After:
The check is basically:
The text was updated successfully, but these errors were encountered: