Skip to content

Commit

Permalink
fix(updater): fixed check for custom updater
Browse files Browse the repository at this point in the history
  • Loading branch information
simonecorsi committed Nov 8, 2023
1 parent c9b5776 commit 78a81d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/updaters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ module.exports.resolveUpdaterObjectFromArgument = function (arg) {
};
}
try {
if (typeof updater.updater === 'string') {
if (
typeof updater.updater === 'object' &&
isValidUpdater(updater.updater)
) {
return updater;
} else if (typeof updater.updater === 'string') {
updater.updater = getCustomUpdaterFromPath(updater.updater);
} else if (updater.type) {
updater.updater = getUpdaterByType(updater.type);
} else if (isValidUpdater(updater.updater)) {
return updater;
} else {
updater.updater = getUpdaterByFilename(updater.filename);
}
Expand Down

0 comments on commit 78a81d3

Please sign in to comment.