mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(pkg): skip invalid workspace packages
[skip ci]
This commit is contained in:
parent
f1377a7f8d
commit
ba50d3b392
@ -171,10 +171,12 @@ export default class Package {
|
||||
for (const workspace of this.pkg.workspaces || []) {
|
||||
const dirs = await glob(workspace)
|
||||
for (const dir of dirs) {
|
||||
const pkg = new Package({
|
||||
rootDir: this.resolvePath(dir)
|
||||
})
|
||||
if (existsSync(this.resolvePath(dir, 'package.json'))) {
|
||||
const pkg = new Package({ rootDir: this.resolvePath(dir) })
|
||||
packages.push(pkg)
|
||||
} else {
|
||||
consola.warn('Invalid workspace package:', dir)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user