discourse-doctor: support custom app names as CLI arg #988
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.
While
launcher
allows to pass any container/app name as CLI argument,discourse-doctor
does not, but support two hardcoded names only.This commit adds support for custom names taken from first CLI argument. It is done in a non-breaking change. If the argument is empty, or the related YAML file does not exist, it continues to check for the two hardcoded names like before.
E.g. we use
discourse.yml
, and I was intuitively tryingdiscourse-doctor discourse
, thendiscourse-doctor discourse.yml
anddiscourse-doctor container/discourse.yml
, before checking the code, and realizing that it really checks for two hardcoded names only. Maybe others who use custom container names might expect the same, given thatlauncher rebuild/enter/...
all take the container name from CLI arg. But of course I can add some help output for documentation purpose if wanted. Also I was thinking about looping through all actually existingcontainer/*.yml
files, offering aread -p
selection, or taking the only one automatically (if there is one only). But keeping it simple for now, not adding any functional change as long as the argument does not really match an existing YAML file.