Skip to content

feat(builtins): support -d @- and -d @file in curl builtin#929

Merged
chaliy merged 3 commits intomainfrom
claude/bashkit-issue-928-5abjf
Apr 1, 2026
Merged

feat(builtins): support -d @- and -d @file in curl builtin#929
chaliy merged 3 commits intomainfrom
claude/bashkit-issue-928-5abjf

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 1, 2026

Summary

  • Add support for -d @- (read request body from stdin) and -d @/path/to/file (read from VFS file) in the curl builtin, matching real curl behavior
  • File-not-found returns exit code 26 with a clear error message
  • Update specs/005-builtins.md to document the new -d @ support

Tests added

  • test_curl_data_at_stdin-d @- reads from stdin
  • test_curl_data_at_file-d @/path reads from VFS file
  • test_curl_data_at_file_not_found — missing file returns exit code 26
  • test_curl_data_at_stdin_none-d @- with no stdin resolves to empty string
  • test_curl_data_literal_no_at — plain -d value still works unchanged

Test plan

  • cargo test --all-features — 2150+ tests pass
  • cargo fmt --check — clean
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • CI green

Closes #928

chaliy added 3 commits April 1, 2026 21:51
Read request body from stdin (-d @-) or VFS file (-d @/path) instead of
treating the @ prefix as a literal string. Matches real curl behavior.

Closes #928
Add tests for -d @- with no stdin and -d with plain data (no @ prefix).
Assert exit code 26 for missing file. Update 005-builtins spec to
document @-/@ file support for -d option.
Bump exemption versions in supply-chain/config.toml for 25 transitive
dependencies (icu_*, wasm-bindgen*, libc, js-sys, web-sys, zerovec*,
yoke*, zerofrom*, etc.) and remove stale entries for crates now covered
by imported audits.
@chaliy chaliy merged commit bd3aec5 into main Apr 1, 2026
27 checks passed
@chaliy chaliy deleted the claude/bashkit-issue-928-5abjf branch April 1, 2026 22:33
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.

curl builtin: support -d @- (read request body from stdin)

1 participant