@thisismanta/semantic-version 11.7.0 → 11.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src.js +5 -8
- package/package.json +1 -1
package/lib/src.js
CHANGED
|
@@ -453,21 +453,18 @@ function yn(value, { lenient: lenient$1 = false, default: default_ } = {}) {
|
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/index.ts
|
|
456
|
-
const
|
|
456
|
+
const debugging = yn(process.env.DEBUG) || yn(process.env.RUNNER_DEBUG);
|
|
457
457
|
function run(command) {
|
|
458
458
|
return new Promise((resolve, reject) => {
|
|
459
459
|
node_child_process.exec(command, (error, stdout, stderr) => {
|
|
460
460
|
stdout = stdout.trim();
|
|
461
|
-
if (
|
|
461
|
+
if (debugging) {
|
|
462
462
|
console.log("::debug::»" + command);
|
|
463
|
-
console.log("::debug
|
|
463
|
+
console.log("::debug::", stdout);
|
|
464
464
|
}
|
|
465
465
|
if (error) {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
if (stdout.length > 0) console.log("»", stdout);
|
|
469
|
-
}
|
|
470
|
-
console.log("::error::»", error.message);
|
|
466
|
+
console.log("::error::", error.message);
|
|
467
|
+
if (!debugging && stdout.length > 0) console.log(stdout);
|
|
471
468
|
console.log(stderr.trimEnd());
|
|
472
469
|
reject(error);
|
|
473
470
|
} else resolve(stdout);
|