diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-26 15:24:23 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-26 15:24:23 -0700 |
commit | a5ca56eeeddc3cc1f1e92608b8b67e917d86837e (patch) | |
tree | 1604662b67066b2edd25be0d7bcd7ded75069aed /scripts/frontend/postinstall.js | |
parent | d7c79839d3e993c8166907fbe277752115897fee (diff) | |
parent | 292cf668905a55e7b305c67b314cb039d2681a54 (diff) | |
download | gitlab-ce-a5ca56eeeddc3cc1f1e92608b8b67e917d86837e.tar.gz |
Merge branch 'master' into sh-support-bitbucket-server-import
Diffstat (limited to 'scripts/frontend/postinstall.js')
-rw-r--r-- | scripts/frontend/postinstall.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/frontend/postinstall.js b/scripts/frontend/postinstall.js new file mode 100644 index 00000000000..682039a41b3 --- /dev/null +++ b/scripts/frontend/postinstall.js @@ -0,0 +1,22 @@ +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.`); |