Skip to content

Commit

Permalink
quote json variable so $variables are not expanded during shell echo (#…
Browse files Browse the repository at this point in the history
…1639)

Signed-off-by: Subbarao Meduri <smeduri@redhat.com>
  • Loading branch information
subbarao-meduri authored Oct 2, 2024
1 parent 6c3c1d8 commit 9e39f7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/generate-dashboard-configmap-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ start() {
fi

# delete dashboard uid avoid conflict with old dashboard
dashboardJson=$(echo $dashboardJson | $PYTHON_CMD -c "import sys, json; d=json.load(sys.stdin);del d['uid'];print(json.dumps(d))")
dashboardJson=$(echo "$dashboardJson" | $PYTHON_CMD -c "import sys, json; d=json.load(sys.stdin);del d['uid'];print(json.dumps(d))")

if [ $dashboardFolderId -ne 0 ]; then
if [ -n "$dashboardFolderId" ] && [ "$dashboardFolderId" -ne 0 ]; then
cat >$savePath/$dashboard_name.yaml <<EOF
kind: ConfigMap
apiVersion: v1
Expand Down

0 comments on commit 9e39f7c

Please sign in to comment.