diff options
author | Fatih Acet <acetfatih@gmail.com> | 2018-06-26 16:48:25 +0200 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2018-06-26 16:48:25 +0200 |
commit | 13a8ad61b2cc37cf65f482bfa6855d8e2060a554 (patch) | |
tree | ec6bfe03a00cd03d5ee4841d31865e861e84fb45 /scripts/frontend | |
parent | 4e734a9004f5241a33af8e962781acb33cbbadab (diff) | |
parent | d374d39cc7272e92b4ed3485095b6f2c6351b1b8 (diff) | |
download | gitlab-ce-13a8ad61b2cc37cf65f482bfa6855d8e2060a554.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into acet-mr-diffs-autosave
Diffstat (limited to 'scripts/frontend')
-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.`); |