Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ export class CommandRunnerImpl implements CommandRunner {

default: {
const action = this.actions[actionDescriptor.name];

// Ensure we don't miss any new actions. Needed because we don't have input validation.
if (action == null) {
throw new Error(`Unknown action: ${actionDescriptor.name}`);
}

this.finalStages = action.getFinalStages?.() ?? [];
this.noAutomaticTokenExpansion =
action.noAutomaticTokenExpansion ?? false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export class MarkStageFactoryImpl implements MarkStageFactory {
return new TargetMarkStage(this.targetPipelineRunner, mark);
case "explicit":
return new ExplicitMarkStage(mark);
default: {
// Ensure we don't miss any new marks. Needed because we don't have input validation.
const _exhaustiveCheck: never = mark;
const { type } = mark;
throw new Error(`Unknown mark: ${type}`);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ export class ModifierStageFactoryImpl implements ModifierStageFactory {
throw Error(
`Unexpected modifier '${modifier.type}'; it should have been removed during inference`,
);
default: {
// Ensure we don't miss any new modifiers. Needed because we don't have input validation.
const _exhaustiveCheck: never = modifier;
const { type } = modifier;
throw new Error(`Unknown modifier: ${type}`);
}
}
}

Expand Down
Loading