init
This commit is contained in:
14
platform/cli/src/commands/utils/validateYarn.js
Normal file
14
platform/cli/src/commands/utils/validateYarn.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import chalk from 'chalk';
|
||||
import { execa } from 'execa';
|
||||
|
||||
export default async function validateYarn() {
|
||||
try {
|
||||
await execa('yarn', ['--version']);
|
||||
} catch (err) {
|
||||
console.log(
|
||||
'%s Yarn is not installed, please install it before linking your extension',
|
||||
chalk.red.bold('ERROR')
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user