Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the 4th or 5th swing at something like this but the first one I think is actually viable.
All of the other attempts resulted in something that just felt difficult to maintain over time with a giant set of checks that are totally disconnected from the actual code they're checking.
In this setup, we turn our install scripts into something more resembling modules with some different functionality. This helps keep the verification code close to the code it's verifying which should make it maintainable without becoming a chore.
$OMARCHY_DESCRIPTION
defines a nice name we can call it during install and in theomarchy-doctor
run.should_run()
defines the run conditions for the script and is optional but useful for things like hardware fixesomarchy_install()
defines any install commands (executed byinstall.sh
)omarchy_verify()
defines any verification commands (executed byomarchy-doctor
)This could even allow going a step further to convert things like the present day
omarchy-install-tailscale
to be an install script that isn't executed during the main install but hasomarchy_install
andomarchy_verify
available such that you could execute the verification for it if the user had Tailscale installed.NOTE: This is pulled back into #1860 because there were some changes there to the whole login bit that I didn't want to redo.
The output is simple and could be made more sophisticated over time but does the job.
Interestingly enough, the creation of this script actually caught a couple of things on my new system that were already out of spec and I had no idea.