gitlab-org--gitlab-foss/scripts/frontend/postinstall.js
Mike Greiling c46b791911
Remove node 6 trailing comma support
This removes trailing commas from node scripts which previously
omitted them for compatiblity with node 6
2019-03-11 14:16:41 -05:00

22 lines
681 B
JavaScript

const chalk = require('chalk');
// check that fsevents is available if we're on macOS
if (process.platform === 'darwin') {
try {
require.resolve('fsevents');
} catch (e) {
console.error(`${chalk.red('error')} Dependency postinstall check failed.`);
console.error(
chalk.red(`
The fsevents driver is not installed properly.
If you are running a new version of Node, please
ensure that it is supported by the fsevents library.
You can try installing again with \`${chalk.cyan('yarn install --force')}\`
`),
);
process.exit(1);
}
}
console.log(`${chalk.green('success')} Dependency postinstall check passed.`);