Skip to content

Commit 46fb64f

Browse files
cmcgee1024heckj
andauthored
Document the TMPDIR environment variable for better discovery (#308)
* Add documentation about the TMPDIR environment variable for better discovery --------- Co-authored-by: Joseph Heck <[email protected]>
1 parent 8f0bf20 commit 46fb64f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-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 swiftly uses to hold large files, such as downloads, until it cleans them 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: Swiftly downloads toolchains to a temporary file that it later cleans during its installation process. If these files are too big for your system temporary directory, set 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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ 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: Swiftly downloads toolchains to a temporary file that it later cleans during its installation process. If these files are too big for your system temporary directory, set another location by setting the `TMPDIR` environment variable.
48+
49+
$ TMPDIR=/large/file/tmp/storage swiftly install latest
4650
"""
4751
))
4852
var version: String?

0 commit comments

Comments
 (0)