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

DRAFT: plugin/battery: multiple batteries #2076

Merged
merged 5 commits into from
Feb 14, 2022

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented Feb 3, 2022

Description

  • Splits the upower invocation in two,
  • expands the upower mock in the tests to return multiple paths.

Motivation and Context

#2074 / NariyasuHeseri#1

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

NariyasuHeseri and others added 4 commits January 29, 2022 03:30
When `upower --enumerate | grep -i BAT` returns multiple lines of results (which are file paths),
the added quotation (from commit 3cb5f3f) concatenates them all to provide an invalid path.
Thus to make the plugin work as before the commit,
take only the first line of the results.
@NoahGorny NoahGorny merged commit 0619c19 into Bash-it:master Feb 14, 2022
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.

None yet

3 participants