Skip to content

Commit

Permalink
fix: target can be set with overrides or by plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy committed Dec 11, 2024
1 parent 2526858 commit d706dfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/artillery/lib/util/prepare-test-execution-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function prepareTestExecutionPlan(inputFiles, flags, _args) {
// cases where the value of config.target is set to a value from the environment which
// is not available at this point in time. Example: target is set to an environment variable
// the value of which is only available at runtime in AWS Fargate
const hasTarget =
const hasOriginalTarget =
typeof script1.config.target !== 'undefined' ||
typeof script1.config.environments?.[flags.environment]?.target !==
'undefined';
Expand All @@ -51,7 +51,7 @@ async function prepareTestExecutionPlan(inputFiles, flags, _args) {
script4._scriptPath
);

if (!hasTarget) {
if (!script5.config.target && !hasOriginalTarget) {
throw new Error('No target specified and no environment chosen');
}

Expand Down

0 comments on commit d706dfd

Please sign in to comment.