[fix]: shell commands execution failure on app reload#427
Merged
thecodacus merged 2 commits intostackblitz-labs:mainfrom Nov 29, 2024
Merged
[fix]: shell commands execution failure on app reload#427thecodacus merged 2 commits intostackblitz-labs:mainfrom
thecodacus merged 2 commits intostackblitz-labs:mainfrom
Conversation
hgosansn
approved these changes
Nov 27, 2024
needed to return promise for proper artifact chaining
thecodacus
approved these changes
Nov 29, 2024
| .catch((error) => { | ||
| console.error('Action failed:', error); | ||
| }); | ||
| return this.#currentExecutionPromise; |
Collaborator
There was a problem hiding this comment.
Added this line for inter artifact chaining to work properly in workbench level
Collaborator
|
thanks for the fix |
jhillbht
pushed a commit
to jhillbht/bolt.new-any-llm
that referenced
this pull request
Jan 27, 2025
[fix]: shell commands execution failure on app reload
Stijnus
pushed a commit
to Stijnus/bolt.diy
that referenced
this pull request
Mar 19, 2025
[fix]: shell commands execution failure on app reload
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.
Behavior
When the app reloads, it re-runs all the commands, but the shell commands were failing. To fix this issue, I've made the following change in the app/lib/runtime/action-runner.ts file:
Now the actions are properly awaited
Before Change:

After Change:

Key Change
Addition of the return statement before calling this.#executeAction. This ensures that the promise returned by this.#executeAction is properly awaited and propagated through the promise chain, preventing the subsequent actions from running before the current one has completed.
Testing
Note: Code changes also contains a prettier fix regarding
let currentLevel: DebugLevel = (import.meta.env.VITE_LOG_LEVEL ?? import.meta.env.DEV) ? 'debug' : 'info';