Unverified Commit eec18eca authored by Sriram Thiagarajan's avatar Sriram Thiagarajan Committed by GitHub

[create-next-app] update logic for shouldUseYarn function (#11683)

Co-authored-by: 's avatarJoe Haddad <joe.haddad@zeit.co>
parent b91ee110
......@@ -2,6 +2,10 @@ import { execSync } from 'child_process'
export function shouldUseYarn() {
try {
const userAgent = process.env.npm_config_user_agent
if (userAgent) {
return Boolean(userAgent && userAgent.startsWith('yarn'))
}
execSync('yarnpkg --version', { stdio: 'ignore' })
return true
} catch (e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment