From ed70e816870bec0ea2e0af7dd909f9a49ffc78d5 Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Wed, 27 Nov 2019 09:47:03 -0500 Subject: [PATCH] Increase log verbosity when starting or updating the app. --- run.js | 8 ++++---- update.js | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/run.js b/run.js index 8c34879..4f36d9e 100644 --- a/run.js +++ b/run.js @@ -16,11 +16,11 @@ if (missingModules.client || missingModules.server) { process.stdout.write('Installing node modules...'); if (missingModules.client) { - childProcess.execSync('npm install', { cwd: clientPath, stdio: 'ignore' }); + childProcess.execSync('npm install', { cwd: clientPath, silent: true }); } if (missingModules.server) { - childProcess.execSync('npm install', { cwd: serverPath, stdio: 'ignore' }); + childProcess.execSync('npm install', { cwd: serverPath, silent: true }); } process.stdout.write(' done\n'); @@ -52,7 +52,7 @@ if (!fs.existsSync(envFile)) { if (!fs.existsSync(path.resolve(clientPath, 'dist/main.html'))) { process.stdout.write('Building client app...'); - childProcess.execSync('npm run build', { cwd: clientPath, stdio: 'ignore' }); + childProcess.execSync('npm run build', { cwd: clientPath, silent: true }); process.stdout.write(' done\n'); } @@ -63,7 +63,7 @@ if (process.env.DB_DIALECT === 'sqlite') { if (!fs.existsSync(dbFile)) { process.stdout.write(`Creating SQLITE database at ${dbFile}...`); - childProcess.execSync('npm run migrate', { cwd: serverPath, stdio: 'ignore' }); + childProcess.execSync('npm run migrate', { cwd: serverPath, silent: true }); process.stdout.write(' done\n'); } } diff --git a/update.js b/update.js index 75979ec..22d0961 100644 --- a/update.js +++ b/update.js @@ -7,22 +7,22 @@ const clientPath = path.resolve(__dirname, 'client'); const serverPath = path.resolve(__dirname, 'server'); process.stdout.write('Pulling new version from github...'); -childProcess.execSync('git pull', { stdio: 'ignore' }); +childProcess.execSync('git pull', { silent: true }); process.stdout.write(' done\n'); process.stdout.write('Updating node modules...'); -childProcess.execSync('npm install', { cwd: clientPath, stdio: 'ignore' }); -childProcess.execSync('npm prune', { cwd: clientPath, stdio: 'ignore' }); -childProcess.execSync('npm install', { cwd: serverPath, stdio: 'ignore' }); -childProcess.execSync('npm prune', { cwd: serverPath, stdio: 'ignore' }); +childProcess.execSync('npm install', { cwd: clientPath, silent: true }); +childProcess.execSync('npm prune', { cwd: clientPath, silent: true }); +childProcess.execSync('npm install', { cwd: serverPath, silent: true }); +childProcess.execSync('npm prune', { cwd: serverPath, silent: true }); process.stdout.write(' done\n'); process.stdout.write('Migrating database...'); -childProcess.execSync('npm run migrate', { cwd: serverPath, stdio: 'ignore' }); +childProcess.execSync('npm run migrate', { cwd: serverPath, silent: true }); process.stdout.write(' done\n'); process.stdout.write('Building client app...'); -childProcess.execSync('npm run build', { cwd: clientPath, stdio: 'ignore' }); +childProcess.execSync('npm run build', { cwd: clientPath, silent: true }); process.stdout.write(' done\n'); process.stdout.write('Please restart Rdio Scanner\n') \ No newline at end of file