Skip to content

Commit

Permalink
make sure that arrayified healthchecks end up in the right place as w…
Browse files Browse the repository at this point in the history
…ell (#57)
  • Loading branch information
pirog authored Sep 23, 2023
1 parent d47677b commit 638d17d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/lando-healthcheck/utils/normalize-healthcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const defaults = {delay: 1000, retry: 25, user: 'root'};
module.exports = healthcheck => {
// if healthcheck is a string then objectify
if (typeof healthcheck === 'string') healthcheck = {command: healthcheck};
// ditto if its an array
else if (Array.isArray(healthcheck)) healthcheck = {command: healthcheck};
// allow cmd shorthand
if (!healthcheck.command && healthcheck.cmd) healthcheck.command = healthcheck.cmd;
// merge in defaults and return
Expand Down

0 comments on commit 638d17d

Please sign in to comment.