<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 01.10.17 19:28, Muhammad Tahir Vali
via swift-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAAG6x8_tM6EzJOjsy250c597Uo-x7G0v5wNXdXXY6j6-3OnfGg@mail.gmail.com">
<div dir="ltr">Hello,
<div><br>
</div>
<div>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? </div>
<div><br>
</div>
<div>
<p
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
style="font-variant-ligatures:no-common-ligatures">swift
tools --version</span></p>
<p
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
style="font-variant-ligatures:no-common-ligatures">error:
unable to invoke subcommand:
/Library/Developer/Toolchains/swift-4.0-RELEASE.xctoolchain/usr/bin/swift-tools
(No such file or directory)</span></p>
</div>
</div>
</blockquote>
If you still have swiftenv installed, try this:<br>
<br>
$ swiftenv global<br>
4.0<br>
<br>
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:<br>
<br>
$ swiftenv global 4.0<br>
<br>
Call:<br>
<br>
$ swiftenv versions<br>
<br>
to get a list of all available versions.<br>
<br>
The version selection is stored in a text file at
~/.swiftenv/version, so I think you can also delete that file to
reset it.<br>
</body>
</html>