Skip to content

fix(dotnet): run the audit task under posix sh - #84

Merged
CMaintz merged 1 commit into
mainfrom
fix/dotnet-audit-posix-shell
Oct 9, 2026
Merged

CMaintz merged 1 commit into
mainfrom
fix/dotnet-audit-posix-shell

Conversation

@CMaintz

@CMaintz CMaintz commented Oct 9, 2026

Copy link
Copy Markdown
Owner

The dotnet audit mise task used set -euo pipefail, but mise runs toml tasks under sh (dash), which rejects pipefail (sh: set: Illegal option -o pipefail). It surfaced the first time a consumer actually ran mise run audit (jev-dotnet adopting the dotnet stack); Foundry's own CI has no .NET project, so the task was never exercised here.

set -eu runs under both sh and bash. The explicit out=$(dotnet list ...) || exit 1 capture is what fails loud on a dotnet list error, not pipefail, so the audit keeps its teeth.

mise runs toml tasks with sh (dash), which rejects `set -o pipefail`, so
the audit task errored at "Illegal option -o pipefail" the first time a
consumer ran it. Foundry's own CI has no .NET project, so it never
exercised the task. The capture `out=$(...) || exit 1` already fails loud
on a dotnet list error, so plain `set -eu` keeps the safety and runs
everywhere.
@CMaintz
CMaintz force-pushed the fix/dotnet-audit-posix-shell branch from 1722268 to 915161a Compare October 9, 2026 11:52
@CMaintz
CMaintz merged commit 26e7a11 into main Oct 9, 2026
6 checks passed
@CMaintz
CMaintz deleted the fix/dotnet-audit-posix-shell branch October 9, 2026 16:15
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.

1 participant