Skip to content

Commit

Permalink
enable top-level error reporting when debug logs are active in workfl…
Browse files Browse the repository at this point in the history
…ow run
  • Loading branch information
dcastil committed Sep 1, 2024
1 parent cbc33f8 commit 092e79b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
13 changes: 8 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35291,10 +35291,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
error(message);
}
exports2.setFailed = setFailed;
function isDebug() {
function isDebug2() {
return process.env["RUNNER_DEBUG"] === "1";
}
exports2.isDebug = isDebug;
exports2.isDebug = isDebug2;
function debug(message) {
command_1.issueCommand("debug", {}, message);
}
Expand Down Expand Up @@ -51693,6 +51693,9 @@ function createProgram(params) {
);
}

// src/run-main.ts
var core = __toESM(require_core());

// node_modules/@effect/platform-node/dist/esm/NodeRuntime.js
var NodeRuntime_exports = {};
__export(NodeRuntime_exports, {
Expand Down Expand Up @@ -51738,18 +51741,18 @@ var runMain3 = runMain2;

// src/run-main.ts
function runMainLive(effect2) {
return NodeRuntime_exports.runMain(effect2, { disableErrorReporting: false });
return NodeRuntime_exports.runMain(effect2, { disableErrorReporting: !core.isDebug() });
}

// src/services/config-provider.ts
var core = __toESM(require_core());
var core2 = __toESM(require_core());
var pathDelimiter = "-";
var sequenceDelimiterRegex = /\s*,\s*/;
var githubActionConfigProvider = ConfigProvider_exports.fromFlat(
ConfigProvider_exports.makeFlat({
load(path, primitive3, split) {
const pathString = path.join(pathDelimiter);
const inputValue = core.getInput(pathString);
const inputValue = core2.getInput(pathString);
if (!inputValue) {
return Effect_exports.fail(
ConfigError_exports.MissingData(
Expand Down
8 changes: 4 additions & 4 deletions dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/run-main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as core from '@actions/core'
import { NodeRuntime } from '@effect/platform-node'
import { Cause, Effect, Exit } from 'effect'

import { ActionError } from './error-handling'

export function runMainLive<A>(effect: Effect.Effect<A, ActionError>) {
return NodeRuntime.runMain(effect, { disableErrorReporting: false })
return NodeRuntime.runMain(effect, { disableErrorReporting: !core.isDebug() })
}

export function runMainTest<A>(effect: Effect.Effect<A, ActionError>) {
Expand Down

0 comments on commit 092e79b

Please sign in to comment.