Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
tmacro committed Nov 14, 2023
1 parent 7e75562 commit ad13f00
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/UtapiReindex.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,18 @@ class UtapiReindex {
if (this._sentinel.sentinelPassword) {
flags.redis_password = this._sentinel.sentinelPassword;
}
if (this._onlyCountLatestWhenObjectLocked) {
flags.only_latest_when_locked = '';
}

/* eslint-enable camelcase */
const opts = [];
Object.keys(flags)
.forEach(flag => {
const name = `--${flag.replace(/_/g, '-')}`;
opts.push(name);
if (flags[flag] !== '') {
opts.push(flags[flag]);
}
});

if (this._onlyCountLatestWhenObjectLocked) {
opts.push('--only-latest-when-locked');
}
return opts;
}

Expand Down

0 comments on commit ad13f00

Please sign in to comment.