Skip to content

Fix current directory lookup for batch commands - #2603

Draft
maximilien-noal wants to merge 2 commits into
masterfrom
fix/dos-batch-current-directory
Draft

maximilien-noal wants to merge 2 commits into
masterfrom
fix/dos-batch-current-directory

Conversation

@maximilien-noal

Copy link
Copy Markdown
Member

Description of Changes

Resolve relative batch commands in the DOS current directory before checking the batch file directory and PATH.

Rationale behind Changes

Commands in the current directory should be found when a batch file changes directories.

Suggested Testing Steps

  • dotnet build tmp\real-mode-pr\src\Spice86.sln --nologo -v:q: passed with 0 warnings and 0 errors.
  • Local tests were not run as requested. Automatic GitHub checks may run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 3, 2026 08:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Current-directory batch matches return unqualified paths, causing child batches that change directories to lose their batch-directory fallback and fail to resolve helper commands.

1 open issue
What changed in this PR

Updates DOS batch command resolution to check the current directory first, supporting commands run after a batch file changes directories.

Changes:

  • Adds current-directory lookup before the existing batch-directory and PATH fallbacks.
File Description
src/​Spice86.Core/​Emulator/​OperatingSystem/​DosBatchExecutionEngine.CommandResolution.cs Prioritizes current-directory matches for bare command names.

Review effort: Balanced

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

No change in generated code or listings. Base 7ee006f4, head b18ce3cc.

Full diff and dumps (zip) · Run

…lly qualified paths'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@maximilien-noal
maximilien-noal marked this pull request as draft December 3, 2026 20:55

This branch has not been deployed

No deployments
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.

2 participants