mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-21 00:35:55 +00:00
fix(schema): resolve workspaceDir to closest git config
This commit is contained in:
parent
34ddc2d2f9
commit
7a2fbce01a
@ -69,7 +69,12 @@ export default defineResolvers({
|
|||||||
workspaceDir: {
|
workspaceDir: {
|
||||||
$resolve: async (val, get) => {
|
$resolve: async (val, get) => {
|
||||||
const rootDir = await get('rootDir')
|
const rootDir = await get('rootDir')
|
||||||
return val && typeof val === 'string' ? resolve(rootDir, val) : await findWorkspaceDir(rootDir).catch(() => rootDir)
|
return val && typeof val === 'string'
|
||||||
|
? resolve(rootDir, val)
|
||||||
|
: await findWorkspaceDir(rootDir, {
|
||||||
|
gitConfig: 'closest',
|
||||||
|
try: true,
|
||||||
|
}).catch(() => rootDir)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user