Skip to content

Commit 62e36bb

Browse files
committed
Add documentation about the TMPDIR environment variable for better discovery
1 parent 351a278 commit 62e36bb

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Documentation/SwiftlyDocs.docc/automated-install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ If you want to install swiftly, or the binaries that it manages into different l
7575

7676
- term `SWIFTLY_HOME_DIR`: The location of the swiftly configuration files, and environment scripts
7777
- term `SWIFTLY_BIN_DIR`: The location of the swiftly binary and toolchain symbolic links (for example swift, swiftc, and so on)
78+
- term `TMPDIR`: The temporary directory to be used by swiftly for temporary files, such as downloads that can be very large until they are cleaned up.
7879

7980
Sometimes swiftly can't automatically detect the system platform, or isn't supported by swift.
8081
You can provide the platform as an option to the `swiftly init` subcommand:

Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ Likewise, the latest snapshot associated with a given development branch can be
5353
$ swiftly install 5.7-snapshot
5454
$ swiftly install main-snapshot
5555

56-
Install whatever toolchain is currently selected, such as the the one in the .swift-version file:
56+
Install whatever toolchain is currently selected, such as the the one in the .swift-version file:
5757

5858
$ swiftly install
5959

60+
NOTE: Toolchains are downloaded to a temporary file that is later cleaned up by the installation process. If these files are too big for your usual temporary directory you can choose another location by setting the `TMPDIR` environment variable.
61+
62+
$ TMPDIR=/large/file/tmp/storage swiftly install latest
63+
6064

6165
**--use:**
6266

Sources/Swiftly/Install.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@ struct Install: SwiftlyCommand {
4040
$ swiftly install 5.7-snapshot
4141
$ swiftly install main-snapshot
4242
43-
Install whatever toolchain is currently selected, such as the the one in the .swift-version file:
43+
Install whatever toolchain is currently selected, such as the the one in the .swift-version file:
4444
4545
$ swiftly install
46+
47+
NOTE: Toolchains are downloaded to a temporary file that is later cleaned up by the installation \
48+
process. If these files are too big for your usual temporary directory you can choose another location \
49+
by setting the `TMPDIR` environment variable.
50+
51+
$ TMPDIR=/large/file/tmp/storage swiftly install latest
4652
"""
4753
))
4854
var version: String?

0 commit comments

Comments
 (0)