Skip to content

Commit

Permalink
fix(inspect): correct usage of resolve (#773)
Browse files Browse the repository at this point in the history
Use `basedir` to specify the initial search path for resolving the CLI
service, since `cwd` is not a valid option property.
  • Loading branch information
jarrodldavis authored and yyx990803 committed Feb 4, 2018
1 parent 59f5913 commit 0f9a44a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli/lib/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function inspect (paths, mode) {
const cwd = process.cwd()
let servicePath
try {
servicePath = resolve.sync('@vue/cli-service', { cwd })
servicePath = resolve.sync('@vue/cli-service', { basedir: cwd })
} catch (e) {
const { error } = require('@vue/cli-shared-utils')
error(`Failed to locate @vue/cli-service. Make sure you are in the right directory.`)
Expand Down

0 comments on commit 0f9a44a

Please sign in to comment.