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

fix: move signal handling to specific commands #352

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Aug 11, 2022

What kind of change does this PR introduce?

bug

What is the current behavior?

ctrl+c is intercepted at root command, causing stdin to not abort (have to use ctrl+d)

What is the new behavior?

proper way seems to be scanning stdin in a goroutine that also selects on the cancel context.
since we don't have many commands which use signal yet, decided move the signal part instead.

Additional context

Add any other context or screenshots.

@sweatybridge sweatybridge marked this pull request as ready for review August 11, 2022 13:15
@sweatybridge sweatybridge requested a review from soedirgo as a code owner August 11, 2022 13:15
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2840053220

  • 2 of 15 (13.33%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 24.855%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/root.go 0 1 0.0%
cmd/link.go 0 2 0.0%
cmd/secrets.go 2 6 33.33%
cmd/db.go 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
cmd/secrets.go 1 50.0%
Totals Coverage Status
Change from base Build 2838729654: 0.04%
Covered Lines: 1199
Relevant Lines: 4824

💛 - Coveralls

@sweatybridge sweatybridge merged commit ba4ac1f into main Aug 12, 2022
@sweatybridge sweatybridge deleted the sig-cmd branch August 12, 2022 06:44
@github-actions
Copy link

🎉 This PR is included in version 0.38.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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