fix(rust): on-file spawn error names the program and the $PATH search - #1181
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1172
A bare
--on-fileprogram missing from$PATHnow fails with a message that names the program (argv[0], not the unsplit template), says$PATHwas searched, and, when a file by that name exists in the command's working directory, offers the./form. Resolution is unchanged: a bare name is never run from the scanned directory.Before:
After:
A name without a local match prints only
failed to spawnnope-xyz: not found on $PATH. A name containing/keeps the OS error, now naming the program.Rust API:
CommandError::Spawn { command, .. }becomesSpawn { program, .. }, andCommandError::NotOnPath { program, local }is new. Migration fragment covers it. No SDK surface changes, so noPARITY.mdchange and no parity drift.Not addressed: the issue's note that the trailing
parser produced no rows ... cannot infer a schemaline is a cascade when every file fails to spawn. That is a separate behavior change and is left for its own issue.Manual run: built
target/debug/dirsql, then in a temp dir with an executableextract.pyandnotebook.md, randirsql --on-file 'extract.py {path}' "SELECT content FROM './notebook.md'"through the Rust binary, the Python launcher (uv run dirsql) and the TS launcher (node packages/ts/dist/cli/dirsql.js). All three print the "After" line above../extract.py {path}returns rows.Changelog / Migrations
<root>/<pkg>/changelog.d/for each changed package (packages/rust/changelog.d/2026-09-24-on-file-not-on-path.md)<root>/<pkg>/migrations.d/(packages/rust/migrations.d/2026-09-24-on-file-not-on-path.md:CommandErrorshape change)E2E Verification
packages/python/e2e-attestations/<branch>.jsonreceipt written ifpackages/pythonchanged (just e2e-attest-python)packages/ts/e2e-attestations/<branch>.jsonreceipt written ifpackages/tschanged (just e2e-attest-ts)cargo test -p dirsql --features cli,uv run maturin developthenjust e2e-attest-python,just e2e-attest-tscommand_runnerandpath_table_on_file_e2ecases); Python e2e 38 passed; TS e2e 18 passed.