Skip to content

files.block placement of temporary output file has flaws #1427

@morrison12

Description

@morrison12

Describe the bug

  1. There is a missing colon in what should be a fall-back to /tmp/ if TMPDIR is not set
  2. As with Location of "askpass" file respects target's TMPDIR but not config.TEMP_DIR #1425, the fallback should be to config.TEMP_DIR not a hard-coded /tmp

To Reproduce

Consequence of #1425

Expected behavior

Temporary files should be put in the correct place.

Meta

System: Darwin
  Platform: macOS-14.7.7-arm64-arm-64bit
  Release: 23.6.0
  Machine: arm64
pyinfra: v3.4.1
  click: v8.2.1
  click: v8.2.1
  click: v8.2.1
  distro: v1.9.0
  gevent: v25.5.1
  jinja2: v3.1.6
  packaging: v25.0
  paramiko: v3.5.1
  python-dateutil: v2.9.0.post0
  pywinrm: v0.5.0
  typeguard: v4.4.4
  typing-extensions: v4.14.1
Executable: /Users/someone/.local/bin/pyinfra
Python: 3.12.11 (CPython, Clang 20.1.4 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions