Skip to content

jenkins, ci-automation: Drop POSIXLY_CORRECT from environment - #4300

Merged
krnowak merged 1 commit into
mainfrom
krnowak/disable-posixly-correct
Oct 1, 2026
Merged

krnowak merged 1 commit into
mainfrom
krnowak/disable-posixly-correct

Conversation

@krnowak

@krnowak krnowak commented Oct 1, 2026

Copy link
Copy Markdown
Member

It wasn't in the environment on purpose, just a side effect of using sh instead of bash.

Should shut up all those sed warnings about not portable stuff from logs.

It wasn't in the environment on purpose, just a side effect of using
`sh` instead of `bash`.

Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:57
@krnowak
krnowak requested a review from a team as a code owner October 1, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Sourceable garbage collectors must retain protection against callers that export POSIXLY_CORRECT.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Prevents Jenkins jobs from inheriting an unintentionally generated POSIXLY_CORRECT variable.

Changes:

  • Uses bash when collecting exported environment variables.
  • Removes local POSIXLY_CORRECT guards from garbage collectors.
File Description
jenkins/​systemd-run-wrap.sh Avoids generating POSIXLY_CORRECT.
ci-automation/​garbage_collect_releases.sh Removes AWK environment guards.
ci-automation/​garbage_collect_github_ci_sdk.sh Removes AWK environment guard.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


local purge_versions
mapfile -t purge_versions < <(unset POSIXLY_CORRECT; \
mapfile -t purge_versions < <(
# For some reasons this is set to the empty string in some environments and it makes gawk
# behave like POSIX awk (i.e. no 'gensub').
unset POSIXLY_CORRECT
local keep=$(
@krnowak
krnowak merged commit ff22943 into main Oct 1, 2026
3 of 4 checks passed
@krnowak
krnowak deleted the krnowak/disable-posixly-correct branch October 1, 2026 14:02

This branch is waiting to be deployed

1 waiting deployment
development — 069a506a Waiting Oct 1, 2026 by krnowak via Wait for approval #5960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants