Skip to content

Fix second Rerun Last Task failing to launch for reevaluateOnRerun tasks#324571

Merged
meganrogge merged 1 commit into
microsoft:mainfrom
dobbydobap:fix-175118-rerun-systeminfo
Jul 6, 2026
Merged

Fix second Rerun Last Task failing to launch for reevaluateOnRerun tasks#324571
meganrogge merged 1 commit into
microsoft:mainfrom
dobbydobap:fix-175118-rerun-systeminfo

Conversation

@dobbydobap

Copy link
Copy Markdown
Contributor

Fixes #175118. Regression from #132916 (dccb659), which made rerun re-resolve the shell instead of reusing the cached config. The re-resolve derives platform from resolver.taskSystemInfo, but _reexecuteCommand never copiedsystemInfoonto the current task the way _executeCommand does — so after the first rerun the stored last task had an undefined systemInfo, and the next rerun resolved the shell on the local host (Path to shell executable '\usr\bin\zsh' does not exist). Carrying systemInfo forward fixes it without reverting the original change.

Copilot AI review requested due to automatic review settings July 6, 2026 17:35

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.

Pull request overview

Fixes a tasks rerun regression in TerminalTaskSystem where consecutive invocations of “Rerun Last Task” for tasks with runOptions.reevaluateOnRerun: false could lose systemInfo, causing shell resolution to fall back to the local host (notably breaking in remote/WSL scenarios).

Changes:

  • Preserve the previous VerifiedTask.systemInfo when re-executing a task via rerun, ensuring subsequent reruns continue to resolve the shell using the correct (remote) task system context.

Comment thread src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts

@meganrogge meganrogge left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@meganrogge meganrogge enabled auto-merge (squash) July 6, 2026 18:54
@meganrogge meganrogge modified the milestones: 1.128.0, 1.129.0 Jul 6, 2026
@meganrogge meganrogge merged commit 4fe0564 into microsoft:main Jul 6, 2026
29 checks passed
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.

Second invocation of "Rerun Last Task" fails to launch terminal process

5 participants