mirror of
https://github.com/zhigang1992/replace-in-file.git
synced 2026-01-12 17:43:32 +08:00
[fix] Quiet cli arg not working (#96)
This commit is contained in:
@@ -13,7 +13,7 @@ module.exports = function combineConfig(config, argv) {
|
||||
//Extract options from config
|
||||
let {
|
||||
from, to, files, ignore, encoding, verbose,
|
||||
allowEmptyPaths, disableGlobs, isRegex, dry,
|
||||
allowEmptyPaths, disableGlobs, isRegex, dry, quiet,
|
||||
} = config;
|
||||
|
||||
//Get from/to parameters from CLI args if not defined in options
|
||||
@@ -48,10 +48,13 @@ module.exports = function combineConfig(config, argv) {
|
||||
if (typeof dry === 'undefined') {
|
||||
dry = !!argv.dry;
|
||||
}
|
||||
if (typeof quiet === 'undefined') {
|
||||
quiet = !!argv.quiet;
|
||||
}
|
||||
|
||||
//Return through parser to validate
|
||||
return parseConfig({
|
||||
from, to, files, ignore, encoding, verbose,
|
||||
allowEmptyPaths, disableGlobs, isRegex, dry,
|
||||
allowEmptyPaths, disableGlobs, isRegex, dry, quiet,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user