Skip to content

Commit 3aa41bd

Browse files
authored
Update swiftly install one-liner and instructions (#936)
* Update the one-liners to explicitly set a swiftly home dir so that the source line works. Update the swiftly path for macOS based on installer changes * Add notes about the environment variables and install location customization * Fix awkward wording in install note. * Fix awkward wording in macOS install note * Adjust the one-liners and installation pages for macOS and Linux
1 parent b5cd470 commit 3aa41bd

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

install/linux/swiftly/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Run the following command in your terminal, to configure swiftly for your accoun
2929
./swiftly init
3030
```
3131

32+
Note: You can set the SWIFTLY_HOME_DIR and SWIFTLY_BIN_DIR environment variables to customize your install location.
33+
3234
Your current shell may need some additional steps to update your session. Follow the guidance at the end of the installation for a smooth install experience, such as sourcing the environment file, and rehashing your shell's PATH.
3335

3436
There can be certain packages that need to be installed on your system so that the Swift toolchain can function. The swiftly initialization routine will show you how to install any missing packages.
@@ -64,4 +66,4 @@ Check for updates to swiftly and install them by running the self-update command
6466
swiftly self-update
6567
```
6668

67-
You can discover more about swiftly in the [documentation](https://www.swift.org/swiftly/documentation/swiftlydocs/)
69+
You can discover more about swiftly in the [documentation](https://www.swift.org/swiftly/documentation/swiftlydocs/)

install/macos/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ title: Install Swift
1515
<h4>Run this in a terminal:</h4>
1616
<div class="language-plaintext highlighter-rouge"><div class="highlight"><button>Copy</button><pre class="highlight"><code>curl -O https://download.swift.org/swiftly/darwin/swiftly-{{ site.data.builds.swiftly_release.version }}.pkg &amp;&amp; \
1717
installer -pkg swiftly-{{ site.data.builds.swiftly_release.version }}.pkg -target CurrentUserHomeDirectory &amp;&amp; \
18-
~/usr/local/bin/swiftly init --quiet-shell-followup &amp;&amp; \
19-
. ~/Library/Application\ Support/swiftly/env.sh &amp;&amp; \
18+
~/.swiftly/bin/swiftly init --quiet-shell-followup &amp;&amp; \
19+
. ~/.swiftly/env.sh &amp;&amp; \
2020
hash -r
2121
</code></pre></div></div>
2222
<h4>License: <a href="https://raw.githubusercontent.com/swiftlang/swiftly/refs/heads/main/LICENSE.txt">Apache-2.0</a></h4>

install/macos/swiftly/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ installer -pkg swiftly-{{ site.data.builds.swiftly_release.version }}.pkg -targe
1414
Run the following command in your terminal, to configure swiftly for your account, and automatically download the latest swift toolchain.
1515

1616
```
17-
~/usr/local/bin/swiftly init
17+
~/.swiftly/bin/swiftly init
1818
```
1919

20+
Note: You can set the SWIFTLY_HOME_DIR and SWIFTLY_BIN_DIR environment variables to customize the install location.
21+
2022
<div class="warning" markdown="1">
2123
Your current shell may need some additional steps to update your session. Follow the guidance at the end of the installation for a smooth install experience, such as sourcing the environment file, and rehashing your shell's PATH.
2224
</div>

0 commit comments

Comments
 (0)