Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/michaelmerrill/wait-on i…
Browse files Browse the repository at this point in the history
…nto allow-config-resources
  • Loading branch information
jeffbski committed Dec 26, 2020
2 parents 546f1bf + 4d94e74 commit db0d080
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/wait-on
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const minimistOpts = {

const argv = minimist(process.argv.slice(2), minimistOpts);

if (argv.help || !argv._.length) {
if (argv.help) {
// help
fs.createReadStream(path.join(__dirname, '/usage.txt'))
.pipe(process.stdout)
Expand All @@ -40,8 +40,10 @@ if (argv.help || !argv._.length) {
opts = require(path.resolve(configFile));
}

// add in the resources listed on the command line
opts.resources = argv._;
// add in the resources listed on the command line (if not present in config)
if (!opts.resources) {
opts.resources = argv._;
}

// now check for specific options and set those
opts = [
Expand Down

0 comments on commit db0d080

Please sign in to comment.