8000 (feature) Add 'remove' commands to types, and an opposite of the `ok` assertion · Issue #9 · borksh/bork · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

(feature) Add 'remove' commands to types, and an opposite of the ok assertion #9

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

Closed
skylarmacdonald opened this issue Feb 25, 2021 · 3 comments
Labels
core Relates to core Bork code, not types or assertions enhancement New feature or request
Milestone

Comments

@skylarmacdonald
Copy link
Member

Bork should be able to check for the absence of something, which will essentially perform the reverse of the ok assertion e.g. ok brew asserts that Homebrew is installed, remove brew (or whatever it is) asserts that it is not present on the system.

The status action on each type can already do the presence/absence checking, so it is just a case of reversing the logic for each type.

A decision needs to be made about the semantics of the assertion, and what the opposite of ok should be.

@skylarmacdonald skylarmacdonald added the enhancement New feature or request label Feb 25, 2021
@skylarmacdonald skylarmacdonald added this to the v1.0.x milestone Feb 25, 2021
@skylarmacdonald skylarmacdonald added the core Relates to core Bork code, not types or assertions label Aug 1, 2021
@skylarmacdonald
Copy link
Member Author

As suggested by de92fd0, I have gone with no as the opposite of ok for now. Open to feedback on changing this if folks have a better suggestion.

Types now need a remove action (will exit with code 1 otherwise which Bork will report as a failure) to respond to no. It does some flipping of statuses, reporting a success when it gets a 10 code (aka $STATUS_MISSING) and a failure otherwise. This means we don't have to change all of the status codes, since they're well-known already.

@skylarmacdonald
Copy link
Member Author

Virtually all types (where it makes sense) now respond to remove as of 3b5dfa0. Need to add it to the docs, but then we can close this.

@skylarmacdonald
Copy link
Member Author

Docs are up to date. Closing. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Relates to core Bork code, not types or assertions enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
0