Skip to content

Commit 0f9a44a

Browse files
jarrodldavisyyx990803
authored andcommitted
fix(inspect): correct usage of resolve (#773)
Use `basedir` to specify the initial search path for resolving the CLI service, since `cwd` is not a valid option property.
1 parent 59f5913 commit 0f9a44a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@vue/cli/lib/inspect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function inspect (paths, mode) {
77
const cwd = process.cwd()
88
let servicePath
99
try {
10-
servicePath = resolve.sync('@vue/cli-service', { cwd })
10+
servicePath = resolve.sync('@vue/cli-service', { basedir: cwd })
1111
} catch (e) {
1212
const { error } = require('@vue/cli-shared-utils')
1313
error(`Failed to locate @vue/cli-service. Make sure you are in the right directory.`)

0 commit comments

Comments
 (0)