Skip to content

Commit 79acf62

Browse files
fix shellcheck: SC2064 Warning (Line 356) - Trap Expansion && SC2155 Warning (Line 659) - Declare and Assign Separately && SC2155 Warning (Line 683) - Declare and Assign Separately
Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
1 parent 4cc9c87 commit 79acf62

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.rhdh/scripts/mirror-plugins.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ function resolve_plugin_index() {
353353
temp_dir=$(mktemp -d)
354354

355355
# Cleanup temp directory when function returns
356+
# shellcheck disable=SC2064
356357
trap "rm -rf '$temp_dir'" RETURN
357358

358359
# Extract the catalog index image
@@ -655,7 +656,8 @@ function mirror_plugins_from_dir() {
655656

656657
local relative_path=${sha256_dir#"$BASE_DIR/"}
657658
local sha256_hash=${sha256_dir##*/sha256_}
658-
local parent_path=$(dirname "$relative_path")
659+
local parent_path
660+
parent_path=$(dirname "$relative_path")
659661

660662
debugf "Processing plugin with SHA256: $parent_path@sha256:$sha256_hash"
661663

@@ -679,7 +681,8 @@ function mirror_plugins_from_dir() {
679681

680682
local relative_path=${tag_dir#"$BASE_DIR/"}
681683
local tag_value=${tag_dir##*/tag_}
682-
local parent_path=$(dirname "$relative_path")
684+
local parent_path
685+
parent_path=$(dirname "$relative_path")
683686

684687
debugf "Processing plugin with tag: $parent_path:$tag_value"
685688

0 commit comments

Comments
 (0)