Skip to content

Commit

Permalink
Only check the presence of files or includes to allow conditional run…
Browse files Browse the repository at this point in the history
…nning without logging a warning.
  • Loading branch information
treshugart committed Jun 21, 2019
1 parent 81a2fab commit eb7e7fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ async function sync(cfg, opt) {
// Make include alias includes for backward compat, for now.
cfg.includes = cfg.includes.concat(cfg.include);

// If there's no files or includes, it's not really an error but there's
// nothing to do.
if (!cfg.files.length && !cfg.includes.length) {
// If no files or includes are specified, we warn. You can still specify
// empty arrays, which explicitly means don't run on anything.
if (!("files" in cfg) && !("includes" in cfg)) {
opt.events.emit(
"warn",
'You have not provided any "files" or "includes". For more information see https://github.com/treshugart/conartist#install for ways you can configure conartist.'
Expand Down

0 comments on commit eb7e7fa

Please sign in to comment.