@thisismanta/semantic-version 11.5.0 → 11.6.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 +6 -2
- package/package.json +1 -1
package/lib/src.js
CHANGED
|
@@ -453,7 +453,8 @@ function yn(value, { lenient: lenient$1 = false, default: default_ } = {}) {
|
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/index.ts
|
|
456
|
-
const
|
|
456
|
+
const debuggingEnabled = yn(process.env.DEBUG) || yn(process.env.RUNNER_DEBUG);
|
|
457
|
+
const debug = debuggingEnabled ? (text) => {
|
|
457
458
|
console.log("::debug::" + text);
|
|
458
459
|
} : () => {};
|
|
459
460
|
function run(command) {
|
|
@@ -464,7 +465,10 @@ function run(command) {
|
|
|
464
465
|
if (stdout.length > 0) debug("Output » " + stdout);
|
|
465
466
|
stderr = stderr.trim();
|
|
466
467
|
if (stderr.length > 0) debug("Error » " + stderr);
|
|
467
|
-
if (error)
|
|
468
|
+
if (error) if (debuggingEnabled && stdout.includes("[ERR_PNPM_UNCLEAN_WORKING_TREE]")) run("git --no-pager diff").finally(() => {
|
|
469
|
+
reject(error);
|
|
470
|
+
});
|
|
471
|
+
else reject(error);
|
|
468
472
|
else resolve(stdout);
|
|
469
473
|
});
|
|
470
474
|
});
|