Skip to content

Commit 58c973f

Browse files
committed
chore: add cwd option when calling globby
make globby working as expected when project path contains parentheses
1 parent 348e36e commit 58c973f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/@vue/cli-plugin-eslint/lint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = function lint (args = {}, api) {
6161
]
6262
.filter(pattern =>
6363
globby
64-
.sync(path.join(cwd, pattern))
64+
.sync(pattern, { cwd })
6565
.some(p => !engine.isPathIgnored(p))
6666
)
6767

packages/@vue/cli-ui/apollo-server/connectors/locales.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function reset (context) {
3636
}
3737

3838
function _loadFolder (root, context) {
39-
const paths = globby.sync([path.join(root, './locales/*.json')])
39+
const paths = globby.sync(['./locales/*.json'], { cwd: root })
4040
paths.forEach(file => {
4141
const basename = path.basename(file)
4242
const lang = basename.substr(0, basename.indexOf('.'))

packages/@vue/cli-ui/apollo-server/resolvers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const resolvers = [{
9090
}]
9191

9292
// Load resolvers in './schema'
93-
const paths = globby.sync([path.join(__dirname, './schema/*.js')])
93+
const paths = globby.sync(['./schema/*.js'], { cwd: __dirname })
9494
paths.forEach(file => {
9595
const { resolvers: r } = require(file)
9696
r && resolvers.push(r)

packages/@vue/cli-ui/apollo-server/type-defs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type Subscription {
8686
`]
8787

8888
// Load types in './schema'
89-
const paths = globby.sync([path.join(__dirname, './schema/*.js')])
89+
const paths = globby.sync(['./schema/*.js'], { cwd: __dirname })
9090
paths.forEach(file => {
9191
const { types } = require(file)
9292
types && typeDefs.push(types)

0 commit comments

Comments
 (0)