mirror of
https://github.com/strapi/strapi.git
synced 2025-07-16 21:41:59 +00:00
14 lines
247 B
JavaScript
14 lines
247 B
JavaScript
'use strict';
|
|
|
|
const execa = require('execa');
|
|
|
|
module.exports = function hasYarn() {
|
|
try {
|
|
const { code } = execa.shellSync('yarnpkg --version');
|
|
if (code === 0) return true;
|
|
return false;
|
|
} catch (err) {
|
|
return false;
|
|
}
|
|
};
|