rsnext/packages/create-next-app/helpers/should-use-yarn.ts
Joe Haddad 104d18c607
Rewrite Create Next App (#8030)
* Completely rewrite Create Next App

* Sort imports

* Show what package manager is being used

* Fix project name suggestion

* Update tests for new implementation

* Use normal prepublish command for on-install

* Upgrade Node version

* Switch to 8.16

* Disable v8 cache

* Swap out update check package and fix CLI boot
2019-07-19 15:55:30 -04:00

10 lines
194 B
TypeScript

import { execSync } from 'child_process'
export function shouldUseYarn() {
try {
execSync('yarnpkg --version', { stdio: 'ignore' })
return true
} catch (e) {
return false
}
}