Skip to content

Commit

Permalink
fix(nx): wrap files inputted to prettier in quotes
Browse files Browse the repository at this point in the history
Files that contained parentheses caused 'yarn format' to fail unless the files passed to the
prettier cli are wrapped in quotes

fix #1473
  • Loading branch information
ZachJW34 authored and vsavkin committed Jun 15, 2019
1 parent 1af94ad commit bf624b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/workspace/src/command-line/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ function getPatterns(args: YargsAffectedOptions) {
);

const libsAndApp = args.libsAndApps;
return libsAndApp ? getPatternsFromApps(patterns) : patterns;
return libsAndApp
? getPatternsFromApps(patterns)
: patterns.map(f => `"${f}"`);
} catch (e) {
return getPatternsWithPathPrefix(['{apps,libs,tools}']);
}
Expand Down

0 comments on commit bf624b7

Please sign in to comment.