Skip to content

Commit 054e5d6

Browse files
committed
bugfix: use core.isDebug in combination with info for debug logging
It seems that `core.debug` is not fully functional. ```shell TypeError: Cannot read properties of undefined (reading 'debug') at Object.debug (/action/main.js:2:61257) at t.App.validateJsonSchema (/action/main.js:2:63500) at t.App.projectContainsValidJsonConfiguration (/action/main.js:2:64504) at t.App.assertSanityChecksArePassing (/action/main.js:2:63051) at /action/main.js:2:99054 at /action/main.js:2:100228 at Object.<anonymous> (/action/main.js:2:100232) at Module._compile (node:internal/modules/cjs/loader:1099:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:975:32) ``` Signed-off-by: Maximilian Bösing <[email protected]>
1 parent 41f302d commit 054e5d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/action/github.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {Output} from '../config/output';
44
import {Logger} from '../logging';
55

66
export class Github implements Action {
7+
78
publish(variable: string, output: Output): void {
89
core.setOutput(variable, JSON.stringify(output));
910
}
@@ -16,7 +17,10 @@ export class Github implements Action {
1617
getLogger(): Logger {
1718
return {
1819
debug(message: string): void {
19-
core.debug(message);
20+
if (!core.isDebug()) {
21+
return;
22+
}
23+
core.info(message);
2024
},
2125

2226
info(message: string): void {

0 commit comments

Comments
 (0)