Skip to content

Commit

Permalink
Use tempfile module to instead of $TMPDIR
Browse files Browse the repository at this point in the history
since subprocess.call won't exapnd environment variables.

Co-authored-by: Richard Levasseur <richardlev@gmail.com>
  • Loading branch information
BurnzZ and rickeylev authored Feb 3, 2025
1 parent 07fe22d commit 91d6cbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/private/python_bootstrap_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ relative_files = True
kparams['stderr'] = sys.stderr

# Prevent coveragepy report issues when packages execute files in tmp dir.
params.append('--omit="$TMPDIR/*"')
import tempfile
omit_pattern = os.path.join(tempfile.gettempdir(), "*")
params.append(f'--omit={omit_pattern}')

ret_code = subprocess.call(
params,
Expand Down

0 comments on commit 91d6cbe

Please sign in to comment.