mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +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 || []) {
|
for (const workspace of this.pkg.workspaces || []) {
|
||||||
const dirs = await glob(workspace)
|
const dirs = await glob(workspace)
|
||||||
for (const dir of dirs) {
|
for (const dir of dirs) {
|
||||||
const pkg = new Package({
|
if (existsSync(this.resolvePath(dir, 'package.json'))) {
|
||||||
rootDir: this.resolvePath(dir)
|
const pkg = new Package({ rootDir: this.resolvePath(dir) })
|
||||||
})
|
|
||||||
packages.push(pkg)
|
packages.push(pkg)
|
||||||
|
} else {
|
||||||
|
consola.warn('Invalid workspace package:', dir)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user