On 01.10.17 19:28, Muhammad Tahir Vali via swift-users wrote:
Hello,

I've updated to swift 4.0 and downloaded a CL tool swiftenv . Mixing and debugging with different versions , I may have messed up my swift environment variables and ultimately deleted my swift-tools. How do I safely default everything back to working form?

swift tools --version

error: unable to invoke subcommand: /Library/Developer/Toolchains/swift-4.0-RELEASE.xctoolchain/usr/bin/swift-tools (No such file or directory)

If you still have swiftenv installed, try this:

$ swiftenv global
4.0

This returns the Swift version swiftenv is currently configured to. If it returns a version that is no longer installed on your system (e.g. something like 4.0-RELEASE, you can reset it to something else with:

$ swiftenv global 4.0

Call:

$ swiftenv versions

to get a list of all available versions.

The version selection is stored in a text file at ~/.swiftenv/version, so I think you can also delete that file to reset it.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to