Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/archive: additionally test for non-existence of file named - #3800

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

roobre
Copy link
Member

@roobre roobre commented Jun 18, 2024

What?

A follow-up to #3797, which I didn't want to push over as it already has approvals.

Why?

Additionally to check for non-existence of archive.tar, also check for non-existence of a file named -, which could happen if the special case of - = stdout is mishandled.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

#3797

@roobre roobre requested a review from a team as a code owner June 18, 2024 17:21
@roobre roobre requested review from mstoykov and codebien and removed request for a team June 18, 2024 17:21
Copy link
Contributor

@codebien codebien left a comment

Choose a reason for hiding this comment

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

As archive.tar is the default value, it makes sense to check that it doesn't exist. Maybe, we can check both, as they are the obvious catch in case of bugs.

@roobre roobre force-pushed the archive-stdout-test branch from 6ffe346 to 06364d2 Compare June 19, 2024 09:47
@roobre
Copy link
Member Author

roobre commented Jun 19, 2024

@codebien Done!

@roobre roobre requested a review from codebien June 19, 2024 09:48
@roobre roobre changed the title cmd/archive: test for non-existence of file named - cmd/archive: additionally test for non-existence of file named - Jun 19, 2024
@roobre roobre force-pushed the archive-stdout-test branch 2 times, most recently from e3d567c to 45897c7 Compare June 19, 2024 10:17
codebien
codebien previously approved these changes Jun 19, 2024
Base automatically changed from archive-stdout to master June 19, 2024 14:54
@joanlopez joanlopez dismissed codebien’s stale review June 19, 2024 14:54

The base branch was changed.

@roobre roobre force-pushed the archive-stdout-test branch from 45897c7 to b2a1543 Compare June 19, 2024 15:01
@joanlopez joanlopez merged commit 8efec40 into master Jun 19, 2024
22 checks passed
@joanlopez joanlopez deleted the archive-stdout-test branch June 19, 2024 15:48
@joanlopez joanlopez added this to the v0.52.0 milestone Jun 19, 2024
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.

3 participants