markkaylor a860d74a35
[Starter CLI] fix has-yarn (#10532)
* fix missing function call

* fix deprecated execa command
2021-06-23 14:00:57 +02:00

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;
}
};