Repository navigation
fix(cli): return failure when init cannot write its template - #6061
Open
Aurantium-47 wants to merge 3 commits into
Open
Aurantium-47 wants to merge 3 commits into
Aurantium-47 wants to merge 3 commits into
Conversation
Assisted-by: OpenAI Codex (model: gpt-6-astra, autonomous)
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
View guided diff | Re-trigger cubic
Assisted-by: OpenAI Codex
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This branch has not been deployed
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.
When
browser-use initcannot write the main template file, it prints an error but exits with status 0. If the output path is an existing directory, a setup script sees a successful command even though no script was created.Raise Click's
ClickExceptionfor write errors so the command exits with status 1 and retains the filesystem error message. Declining an overwrite keeps its existing behavior, and failures for additional manifest files still use the existing warning path.Reproduction on Windows, using a local HTTP template fixture with
demo/main.pyalready a directory:Validation:
AI assistance: OpenAI Codex investigated the issue, wrote the patch and tests, and prepared this description. A separate Codex agent reviewed the change and ran the additional checks.
Summary by cubic
Fixes
browser-use initso a failure to write the main template file now exits with status 1 instead of 0. Previously the command printed an error but reported success, which could mislead setup scripts when the output path was an existing directory.Declining an overwrite keeps its existing behavior, and errors on auxiliary manifest files still use the warning path. Adds regression tests covering write failure, successful write, forced overwrite, and declined overwrite, and verifies the failure error message includes the target filename.
Written for commit 1d4165b. Summary will update on new commits.