Skip to content

Commit

Permalink
download-sbom: improve tmp_dest handling
Browse files Browse the repository at this point in the history
- declare and assign separately to avoid masking return value
  (ShellCheck warning)
- use a template for the tempfile name to make it identifiable when
  running the script locally

Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik committed Aug 12, 2024
1 parent ee02206 commit 8f1db2e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ spec:
# -> https://registry.com/v2/namespace/repo/blobs/sha256:digest
blob_url=$(sed -E 's;([^/]*)/(.*)@(.*);https://\1/v2/\2/blobs/\3;' <<< "$blob_ref")
local tmp_dest=$(mktemp --tmpdir)
local tmp_dest
tmp_dest=$(mktemp --tmpdir download-sbom-task.out.XXXXXX)
local headers_file
headers_file=$(mktemp --tmpdir download-sbom-task.headers.XXXXXX)
Expand Down

0 comments on commit 8f1db2e

Please sign in to comment.