mirror of
https://github.com/strapi/strapi.git
synced 2025-07-17 05:53:01 +00:00
15 lines
265 B
JavaScript
15 lines
265 B
JavaScript
'use strict';
|
|
|
|
const execa = require('execa');
|
|
|
|
module.exports = function hasYarn() {
|
|
try {
|
|
const { exitCode } = execa.sync('yarn --version', { shell: true });
|
|
|
|
if (exitCode === 0) return true;
|
|
return false;
|
|
} catch (err) {
|
|
return false;
|
|
}
|
|
};
|