Skip to content

hack: unquoted variables in release.sh break on paths with spaces #8991

@Ankitsinghsisodya

Description

@Ankitsinghsisodya

Problem

In hack/release.sh, two shell constructs are left unquoted:

  1. Line 68: $(dirname $0) — the inner $0 is not quoted, so the dirname command itself breaks on paths with spaces.
  2. Line 72: ${REPO_ROOT_DIR} — copied-to destination is unquoted, so word-splitting applies if the path contains spaces.
# line 68 (current)
$(dirname $0)/generate-yamls.sh "${REPO_ROOT_DIR}" "${YAML_LIST}"

# line 72 (current)
cp ${ARTIFACTS_TO_PUBLISH} ${REPO_ROOT_DIR}

Proposed Fix

# line 68
"$(dirname "$0")"/generate-yamls.sh "${REPO_ROOT_DIR}" "${YAML_LIST}"

# line 72
cp ${ARTIFACTS_TO_PUBLISH} "${REPO_ROOT_DIR}"

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions