import execa from 'execa' ; param { string } packageDir return { boolean } export async function hasYarn ( packageDir ) { try { await execa . command ( 'yarn --version' , { shell : true , cwd : packageDir , } ) ; return true ; } catch ( e ) { return false ; } }