2021-11-23 16:58:16 +01:00

14 lines
266 B
JavaScript

'use strict';
const execa = require('execa');
module.exports = async function hasYarn() {
try {
const { exitCode } = await execa.commandSync('yarn --version', { shell: true });
if (exitCode === 0) return true;
} catch (err) {
return false;
}
};