diff --git a/Documentation/SwiftlyDocs.docc/automated-install.md b/Documentation/SwiftlyDocs.docc/automated-install.md index e70fb118..7d43b83e 100644 --- a/Documentation/SwiftlyDocs.docc/automated-install.md +++ b/Documentation/SwiftlyDocs.docc/automated-install.md @@ -75,6 +75,7 @@ If you want to install swiftly, or the binaries that it manages into different l - term `SWIFTLY_HOME_DIR`: The location of the swiftly configuration files, and environment scripts - term `SWIFTLY_BIN_DIR`: The location of the swiftly binary and toolchain symbolic links (for example swift, swiftc, and so on) +- term `TMPDIR`: The temporary directory swiftly uses to hold large files, such as downloads, until it cleans them up. Sometimes swiftly can't automatically detect the system platform, or isn't supported by swift. You can provide the platform as an option to the `swiftly init` subcommand: diff --git a/Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md b/Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md index 4478a04b..553b4a92 100644 --- a/Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md +++ b/Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md @@ -53,10 +53,14 @@ Likewise, the latest snapshot associated with a given development branch can be $ swiftly install 5.7-snapshot $ swiftly install main-snapshot - Install whatever toolchain is currently selected, such as the the one in the .swift-version file: +Install whatever toolchain is currently selected, such as the the one in the .swift-version file: $ swiftly install +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. + + $ TMPDIR=/large/file/tmp/storage swiftly install latest + **--use:** diff --git a/Sources/Swiftly/Install.swift b/Sources/Swiftly/Install.swift index 3bbb9299..8984679e 100644 --- a/Sources/Swiftly/Install.swift +++ b/Sources/Swiftly/Install.swift @@ -40,9 +40,13 @@ struct Install: SwiftlyCommand { $ swiftly install 5.7-snapshot $ swiftly install main-snapshot - Install whatever toolchain is currently selected, such as the the one in the .swift-version file: + Install whatever toolchain is currently selected, such as the the one in the .swift-version file: $ swiftly install + + 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. + + $ TMPDIR=/large/file/tmp/storage swiftly install latest """ )) var version: String?