Skip to content

Commit

Permalink
Fix argument
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Apr 17, 2020
1 parent e13a469 commit bf56032
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev-test.yml
Expand Up @@ -62,7 +62,7 @@ jobs:

# #8073 test
- name: Run Tests (PRETTIER_FALLBACK_RESOLVE)
run: yarn test "tests_integration/__tests__/{config,plugin}-*.js"
run: yarn test "tests_integration/__tests__/(config|plugin)"
env:
PRETTIER_FALLBACK_RESOLVE: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-test.yml
Expand Up @@ -134,7 +134,7 @@ jobs:

# #8073 test
- name: Run Tests (PRETTIER_FALLBACK_RESOLVE)
run: yarn test "tests_integration/__tests__/{config,plugin}-*.js"
run: yarn test "tests_integration/__tests__/(config|plugin)"
env:
NODE_ENV: production
PRETTIER_FALLBACK_RESOLVE: true
6 changes: 1 addition & 5 deletions src/common/resolve.js
Expand Up @@ -3,11 +3,7 @@
let { resolve } = eval("require");

// In the VS Code and Atom extension `require` is overridden and `require.resolve` doesn't support the 2nd argument.
if (
/* istanbul ignore next */
resolve.length === 1 ||
process.env.PRETTIER_FALLBACK_RESOLVE
) {
if (resolve.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) {
resolve = (id, options) => {
let basedir;
if (options && options.paths && options.paths.length === 1) {
Expand Down

0 comments on commit bf56032

Please sign in to comment.