adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

incorrect logic for flag `--confirm-new-workspace` in command `aio app init` #792

Closed shazron closed 3 months ago

shazron commented 3 months ago

This flag defaults to true, so it should ask for confirmation if the workspace does not exist.

See https://github.com/adobe/aio-cli-plugin-app/blob/74b1f7132b3b6030f39343d7ac7c8e9c5db0b8da/src/commands/app/init.js#L325

Expected

With the flag default, it should show a confirmation prompt if a workspace does not exist.

Actual

With the flag default, it does not show a confirmation prompt if a workspace does not exist.

Repro

aio app init MyProject --workspace=EntirelyNewWorkspace123

Fix

  1. write a failing test first
  2. reverse the logic (remove the negation)
aiojbot commented 3 months ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2938