Skip to content

Commit 114da91

Browse files
committed
fix: prevent extra args getting passed to clean target
1 parent 9835c19 commit 114da91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nx/src/executors/build/executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default async function runExecutor(options: BuildBuilderSchema, context:
176176
// persisted flags in configurations
177177
additionalArgs.push(...options.flags.split(' '));
178178
}
179-
if (process.argv.length > projectTargetCmdIndex + 1) {
179+
if (!options.clean && process.argv.length > projectTargetCmdIndex + 1) {
180180
// manually added flags to the execution command
181181
const extraFlags = process.argv.slice(projectTargetCmdIndex + 1, process.argv.length);
182182
for (const flag of extraFlags) {

0 commit comments

Comments
 (0)