Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix running checks with both dashes and underscores in name (#213)
The "list-nrpe-checks" action converts underscores to dashes because of key:value juju action result structure, and "run-nrpe-check" converts dashes back to underscores when specifying a check name with dashes. However, if a check name has both dashes and underscores, running the action with the listed check name will never work. This patch using regex search to find the name of the file ignoring dashes and underscores, so it will find the check file in all 3 scenarios. In case there are multiple results it returns an error. Closes: #212
- Loading branch information