generated from nhcarrigan/template
debug: log to console
This commit is contained in:
@@ -127,6 +127,14 @@ const runPnpmInstall = async(
|
|||||||
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Catch blocks receive unknown, cast needed to access stderr/stdout */
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Catch blocks receive unknown, cast needed to access stderr/stdout */
|
||||||
const details = pnpmError as Error & { stderr?: string; stdout?: string };
|
const details = pnpmError as Error & { stderr?: string; stdout?: string };
|
||||||
|
|
||||||
|
// TEMPORARY DEBUG - print full error details to console
|
||||||
|
console.log("=== PNPM ERROR DEBUG ===");
|
||||||
|
console.log("stderr:", details.stderr);
|
||||||
|
console.log("stdout:", details.stdout);
|
||||||
|
console.log("message:", details.message);
|
||||||
|
console.log("full error:", pnpmError);
|
||||||
|
console.log("=== END DEBUG ===");
|
||||||
|
|
||||||
/* eslint-disable capitalized-comments -- v8 coverage requires lowercase */
|
/* eslint-disable capitalized-comments -- v8 coverage requires lowercase */
|
||||||
/* v8 ignore next 5 -- @preserve */
|
/* v8 ignore next 5 -- @preserve */
|
||||||
/* eslint-enable capitalized-comments -- Re-enable rule */
|
/* eslint-enable capitalized-comments -- Re-enable rule */
|
||||||
|
|||||||
+11
-2
@@ -4,8 +4,17 @@
|
|||||||
* @author Naomi Carrigan
|
* @author Naomi Carrigan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Logger } from "@nhcarrigan/logger";
|
// import { Logger } from "@nhcarrigan/logger";
|
||||||
|
|
||||||
const logger = new Logger("Minori", process.env.LOG_TOKEN ?? "");
|
// const logger = new Logger("Minori", process.env.LOG_TOKEN ?? "");
|
||||||
|
|
||||||
|
const logger = {
|
||||||
|
error: (message: string) => {
|
||||||
|
console.error(message);
|
||||||
|
},
|
||||||
|
log: (level: string, message: string) => {
|
||||||
|
console.log(`${level}: ${message}`);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export { logger };
|
export { logger };
|
||||||
|
|||||||
Reference in New Issue
Block a user