Skip to content

Commit 7c46072

Browse files
authored
Merge pull request #99 from redhat-performance/fix/pkg-tool-error-msg
Add error message when OS/platform is not in wrapper config
2 parents e21b23e + 6e7a3e7 commit 7c46072

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

package_tool

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ parse_json()
4343
json_file=$1
4444
platform=$2
4545

46-
jq -r ".dependencies.$platform | @csv" $json_file | tr -d '"'
46+
packages=$(jq -r ".dependencies.$platform | @csv" $json_file 2> /dev/null)
47+
48+
if [[ $? -ne 0 ]]; then
49+
echo "WARN: Could not find dependency information for $platform in $json_file, this could be intended behavior" > /dev/stderr
50+
fi
51+
echo $packages | tr -d '"'
4752
}
4853

4954
# Append packages to a CSV list variable

0 commit comments

Comments
 (0)