fix: handle nuxt static command (#7647)

[release]
This commit is contained in:
Sébastien Chopin 2020-07-01 17:45:56 +02:00 committed by GitHub
parent 05fe682f1d
commit d8dace9748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ export default async function run (_argv, hooks = {}) {
let cmd = await getCommand(argv[0])
// Matching `nuxt` or `nuxt [dir]` or `nuxt -*` for `nuxt dev` shortcut
if (!cmd && (!argv[0] || argv[0][0] === '-' || fs.existsSync(argv[0]))) {
if (!cmd && (!argv[0] || argv[0][0] === '-' || (argv[0] !== 'static' && fs.existsSync(argv[0])))) {
argv.unshift('dev')
cmd = await getCommand('dev')
}