rsnext/packages/create-next-app/lib/utils/get-install-cmd.js
Joe Haddad 4eb8aba692
Add Create Next App package (#8018)
* Add Create Next App package

* Fix Create Next App tests

* Fix company name

* Update package.json
2019-07-17 16:53:56 -04:00

18 lines
237 B
JavaScript

const execa = require('execa')
let cmd
module.exports = function getInstallCmd () {
if (cmd) {
return cmd
}
try {
execa.shellSync('yarnpkg --version')
cmd = 'yarn'
} catch (e) {
cmd = 'npm'
}
return cmd
}