From f43b3e757727aaed9e2b9ad414f1b2d6203a59d3 Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Thu, 28 Nov 2019 08:37:30 -0500 Subject: [PATCH] Process the appropriate stdio with the run and update scripts --- run.js | 8 ++++---- update.js | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/run.js b/run.js index 4f36d9e..1c87bd7 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, silent: true }); + childProcess.execSync('npm install', { cwd: clientPath, stdio: ['ignore', 'ignore', 'pipe'] }); } if (missingModules.server) { - childProcess.execSync('npm install', { cwd: serverPath, silent: true }); + childProcess.execSync('npm install', { cwd: serverPath, stdio: ['ignore', 'ignore', 'pipe'] }); } 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, silent: true }); + childProcess.execSync('npm run build', { cwd: clientPath, stdio: ['ignore', 'ignore', 'pipe'] }); 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, silent: true }); + childProcess.execSync('npm run migrate', { cwd: serverPath, stdio: ['ignore', 'ignore', 'pipe'] }); process.stdout.write(' done\n'); } } diff --git a/update.js b/update.js index 22d0961..dcdfefb 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', { silent: true }); +childProcess.execSync('git pull', { stdio: ['ignore', 'ignore', 'pipe'] }); process.stdout.write(' done\n'); process.stdout.write('Updating node modules...'); -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 }); +childProcess.execSync('npm install', { cwd: clientPath, stdio: ['ignore', 'ignore', 'pipe'] }); +childProcess.execSync('npm prune', { cwd: clientPath, stdio: ['ignore', 'ignore', 'pipe'] }); +childProcess.execSync('npm install', { cwd: serverPath, stdio: ['ignore', 'ignore', 'pipe'] }); +childProcess.execSync('npm prune', { cwd: serverPath, stdio: ['ignore', 'ignore', 'pipe'] }); process.stdout.write(' done\n'); process.stdout.write('Migrating database...'); -childProcess.execSync('npm run migrate', { cwd: serverPath, silent: true }); +childProcess.execSync('npm run migrate', { cwd: serverPath, stdio: ['ignore', 'ignore', 'pipe'] }); process.stdout.write(' done\n'); process.stdout.write('Building client app...'); -childProcess.execSync('npm run build', { cwd: clientPath, silent: true }); +childProcess.execSync('npm run build', { cwd: clientPath, stdio: ['ignore', 'ignore', 'pipe'] }); process.stdout.write(' done\n'); process.stdout.write('Please restart Rdio Scanner\n') \ No newline at end of file