Skip to content

Conversation

@erezrokah
Copy link
Contributor

- Summary

When running ntl sites:delete <site-id> from a directory not linked to a site the prompt before deleting the site had undefined in the warning message.

This PR fixes it.

- Test plan

Before:
image

After:
image

- Description for the changelog

Fix undefined in warning message when deleting a site.

- A picture of a cute animal (not mandatory but encouraged)
image

@erezrokah erezrokah requested a review from a team as a code owner March 10, 2021 15:51
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Mar 10, 2021
if (noForce) {
this.log(`${chalk.redBright('Warning')}: You are about to permanently delete "${chalk.bold(siteData.name)}"`)
this.log(` Verify this siteID "${cwdSiteId}" supplied is correct and proceed.`)
this.log(` Verify this siteID "${siteId}" supplied is correct and proceed.`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cwdSiteId is taken from .netlify/state.json if exists.
siteId is the argument passed to the command

@erezrokah erezrokah requested review from JGAntunes and ehmicky and removed request for JGAntunes March 10, 2021 15:53
@erezrokah erezrokah merged commit 312cc67 into master Mar 11, 2021
@erezrokah erezrokah deleted the fix/undefined_site_id_on_delete branch March 11, 2021 13:38
This was referenced Mar 11, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug code to address defects in shipped code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants