Merge branch 'master' into refactor/cli

This commit is contained in:
ikatyang committed 2017-09-14 12:49:07 +08:00
commit b2a8f3ffce
46 files changed
+987 -303

No files matched your search

+8 -1
View File
@@ -226,7 +226,14 @@ function eachFilename(argv, patterns, callback) {
}
try {
const filePaths = globby.sync(patterns, { dot: true });
const filePaths = globby
.sync(patterns, { dot: true })
.map(
filePath =>
path.isAbsolute(filePath)
? path.relative(process.cwd(), filePath)
: filePath
);
if (filePaths.length === 0) {
console.error(`No matching files. Patterns tried: ${patterns.join(" ")}`);
process.exitCode = 2;