Skip to content

#2106 cdp: honor skipInteraction flag in build's purge prompt - #2672

Open
Pushpak731 wants to merge 2 commits into
Accenture:mainfrom
Pushpak731:fix/cdp-skip-interaction
Open

Pushpak731 wants to merge 2 commits into
Accenture:mainfrom
Pushpak731:fix/cdp-skip-interaction

Conversation

@Pushpak731

Copy link
Copy Markdown

PR details

What changes did you make? (Give an overview)

The build() method's deploy-folder purge prompt only checked whether OPTIONS.purge was already set, never skipInteraction. Running mcdev cdp --y still triggered the interactive confirm. The prompt is now skipped when the flag is set, and purge defaults to true (the same default the confirm dialogue uses).

Further details (optional)

Root cause: mcdev cdp calls Mcdev.build() internally (via DevOps.buildDeltaDefinitions). The purge check at that call site was typeof Util.OPTIONS.purge !== 'boolean' — it has no skipInteraction guard, unlike the equivalent prompt in devops.js which correctly checks !Util.skipInteraction.

Fix: add && !Util.OPTIONS.skipInteraction to the condition, plus an else if that sets purge = true (the confirm's default) so the downstream deploy-folder purge still runs.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable) — N/A, flag-handling fix only

The build() method's deploy-folder purge prompt checked whether
OPTIONS.purge was already set but never checked skipInteraction, so
mcdev cdp --y still prompted. The prompt is now skipped when the flag
is set, and purge defaults to true (the same default the confirm
dialogue uses).
Copilot AI balanced review requested due to automatic review settings October 5, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SkipInteraction not being detected for the mcdev createDeltaPkg command

2 participants