infinitered / solidarity

Solidarity is an environment checker for project dependencies across multiple machines.
https://infinitered.github.io/solidarity/
MIT License
639 stars 49 forks source link

--fix flag #248

Closed ryanlntn closed 4 years ago

ryanlntn commented 5 years ago

This extends rules with a fix property and adds a fix option to the solidarity command that allows users to run the specified fix script when a rule fails. Fixes could be anything from installing a binary via brew to opening documentation in a browser.

codecov[bot] commented 5 years ago

Codecov Report

Merging #248 into master will increase coverage by 2.41%. The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   80.91%   83.33%   +2.41%     
==========================================
  Files          35       36       +1     
  Lines         697      702       +5     
  Branches      133      136       +3     
==========================================
+ Hits          564      585      +21     
+ Misses         88       74      -14     
+ Partials       45       43       -2
Impacted Files Coverage Δ
src/types.ts 100% <ø> (ø) :arrow_up:
src/extensions/functions/checkRequirement.ts 80.64% <100%> (+3.45%) :arrow_up:
src/extensions/functions/setOutputMode.ts 100% <100%> (ø)
src/commands/solidarity.ts 51.21% <66.66%> (+2.19%) :arrow_up:
src/commands/snapshot.ts 55.31% <0%> (+19.14%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f742bbe...bdafc4f. Read the comment docs.

jamonholmgren commented 5 years ago

This is awesome!

tabrindle commented 5 years ago

I really like this, and would love to see where this feature could go! As a sister project to envinfo, I've always envisioned a set of install/uninstall scripts as a library to help "fix" solidarity issues. Maybe in the future we could provide some of these scripts, and offer the custom script option we have here!

GantMan commented 4 years ago

Ryan, do you wanna touch up that message and then we can merge?

ryanlntn commented 4 years ago

@GantMan I updated the error message and confirmed that the require vs. import is no longer needed.

GantMan commented 4 years ago

Awesome! TY!