Skip to content

hack: unquoted ${REPO_ROOT_DIR} inside mktemp call in verify-codegen.sh #9003

@Ankitsinghsisodya

Description

@Ankitsinghsisodya

Problem

hack/verify-codegen.sh line 25:

readonly TMP_DIFFROOT="$(mktemp -d ${REPO_ROOT_DIR}/tmpdiffroot.XXXXXX)"

${REPO_ROOT_DIR} is unquoted inside the mktemp argument. If the repository root path contains spaces, the shell splits the argument and mktemp receives the wrong input, causing it to fail or create a temp directory in the wrong location.

Proposed Fix

readonly TMP_DIFFROOT="$(mktemp -d "${REPO_ROOT_DIR}/tmpdiffroot.XXXXXX")"

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