v1.18.x
psychobunny 7 years ago
commit a048edb60b

@ -8,9 +8,9 @@ var dirname = require('./paths').baseDir;
// check to make sure dependencies are installed
try {
require('../../package.json');
fs.accessSync(path.join(dirname, 'package.json'), fs.constants.R_OK);
} catch (e) {
if (e.code === 'MODULE_NOT_FOUND') {
if (e.code === 'ENOENT') {
console.warn('package.json not found.');
console.log('Populating package.json...');
@ -18,6 +18,8 @@ try {
packageInstall.preserveExtraneousPlugins();
try {
fs.accessSync(path.join(dirname, 'node_modules/colors/package.json'), fs.constants.R_OK);
require('colors');
console.log('OK'.green);
} catch (e) {
@ -29,6 +31,8 @@ try {
}
try {
fs.accessSync(path.join(dirname, 'node_modules/semver/package.json'), fs.constants.R_OK);
var semver = require('semver');
var defaultPackage = require('../../install/package.json');

@ -33,6 +33,8 @@ function installAll() {
var prod = global.env !== 'development';
var command = 'npm install';
try {
fs.accessSync(path.join(dirname, 'node_modules/nconf/package.json'), fs.constants.R_OK);
var packageManager = require('nconf').get('package_manager');
if (packageManager === 'yarn') {
command = 'yarn';

Loading…
Cancel
Save