Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

setup: show script logs only in verbose mode

Abdullah Atta33194dc9f016
diff --git a/scripts/execute.mjs b/scripts/execute.mjs
index 71d18b922..9575d9a3f 100644
--- a/scripts/execute.mjs
+++ b/scripts/execute.mjs
@@ -25,7 +25,10 @@ import path from "path";
import { fileURLToPath } from "url";
import parser from "yargs-parser";
-const args = parser(process.argv, { alias: { force: ["-f"] } });
+const args = parser(process.argv, {
+ alias: { force: ["-f"], verbose: ["-v"] }
+});
+const isVerbose = process.env.CI || args.verbose;
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const config = JSON.parse(
@@ -83,7 +86,7 @@ async function runScript(command, pkg) {
return new Promise((resolve, reject) => {
const child = spawn("npm", ["run", command], {
cwd: pkg,
- stdio: "inherit",
+ stdio: isVerbose ? "inherit" : "pipe",
shell: true
});