Skip to content

Commit

Permalink
fix: dependency error message rendering (#6847)
Browse files Browse the repository at this point in the history
fix: fix dependency error message rendering

Fix the case when an action depends on runtime outputs of a disabled action.
  • Loading branch information
vvagaytsev authored Feb 12, 2025
1 parent 5833547 commit c7da2f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/tasks/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
} from "../events/util.js"
import { styles } from "../logger/styles.js"
import type { ActionRuntime } from "../plugin/base.js"
import { deline } from "../util/string.js"

export function makeBaseKey(type: string, name: string) {
return `${type}.${name}`
Expand Down Expand Up @@ -282,8 +283,10 @@ export abstract class BaseActionTask<T extends Action, O extends ValidResultType
if (disabled && action.kind !== "Build") {
// TODO-0.13.1: Need to handle conditional references, over in dependenciesFromAction()
throw new GraphError({
message: `${this.action.longDescription()} depends on one or more runtime outputs from action
${action.key}, which is disabled. Please either remove the reference or enable the action.`,
message: deline`
${this.action.longDescription()} depends on one or more runtime outputs from action
${styles.highlight(action.key())}, which is disabled.
Please either remove the reference or enable the action.`,
})
}
return [this.getExecuteTask(action)]
Expand Down

0 comments on commit c7da2f2

Please sign in to comment.