Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: returnAlreadyExists when archive exists#3050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dankeboy36 wants to merge1 commit intoarduino:master
base:master
Choose a base branch
Loading
fromdankeboy36:fix/correct-status-code-when-archive-already-exists

Conversation

@dankeboy36
Copy link
Contributor

Please check if the PR fulfills these requirements

Seehow to contribute

  • The PR has no duplicates (please search among thePull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When a client archives a sketch via gRPC and the archiveTarget already exists, the CLI correctly errors, but with the incorrect status code. The status code is 3 (illegal argument) instead of 6 (already exists).
Currently, clients must parse the error message if they want to handle the archive -> fail -> archive with override flow. This might not work reliably with translations.

What is the new behavior?

The CLI errors with the correct already exists status code when archiving a sketch, and the archive target already exists.

Does this PR introduce a breaking change, and istitled accordingly?

Actually, this is a breaking change, but I do not know if any client is explicitly handling status code 3. The Arduino IDE 2.x just wipes the target if it exists:https://github.com/arduino/arduino-ide/blob/4d6cfad0ff603a106efd68ffe015d6fc7449f5fc/arduino-ide-extension/src/node/sketches-service-impl.ts#L637-L639

Other information

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
@codecov
Copy link

codecovbot commentedNov 21, 2025
edited
Loading

Codecov Report

❌ Patch coverage is71.42857% with2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.40%. Comparing base (f102aad) to head (ab99f73).
⚠️ Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
commands/cmderrors/cmderrors.go66.66%2 Missing⚠️
Additional details and impacted files
@@            Coverage Diff             @@##           master    #3050      +/-   ##==========================================- Coverage   69.41%   69.40%   -0.02%==========================================  Files         242      242                Lines       18632    18638       +6     ==========================================+ Hits        12934    12936       +2- Misses       4503     4506       +3- Partials     1195     1196       +1
FlagCoverage Δ
unit69.40% <71.42%> (-0.02%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@dankeboy36

[8]ページ先頭

©2009-2025 Movatter.jp