pyinfra
pyinfra copied to clipboard
Add _temp_dir global argument for configuring temp directory
Fixes #1503 - Users can now specify a custom temporary directory for file operations, allowing downloads of files larger than /tmp capacity.
Changes:
- Add _temp_dir to ConnectorArguments and shell_argument_meta
- Update files.download, files.get, files.put, and files.block to respect the _temp_dir global argument
- Add _temp_dir parameter to make_unix_command() in connectors/util.py
The precedence order is: operation-specific temp_dir > _temp_dir global argument > config.TEMP_DIR > TMPDIR env var > /tmp
- [X] Pull request is based on the default branch (
3.xat this time) - [X] Pull request includes tests for any new/updated operations/facts
- [X] Pull request includes documentation for any new/updated operations/facts
- [X] Tests pass (see
scripts/dev-test.sh) - [X] Type checking & code style passes (see
scripts/dev-lint.sh)