check.js 383 B

1234567891011121314
  1. /*!
  2. Copyright 2013 Lovell Fuller and others.
  3. SPDX-License-Identifier: Apache-2.0
  4. */
  5. try {
  6. const { useGlobalLibvips } = require('../lib/libvips');
  7. if (useGlobalLibvips() || process.env.npm_config_build_from_source) {
  8. process.exit(1);
  9. }
  10. } catch (err) {
  11. const summary = err.message.split(/\n/).slice(0, 1);
  12. console.log(`sharp: skipping install check: ${summary}`);
  13. }