Shopify / shopify-cli

Shopify CLI helps you build against the Shopify platform faster.
https://shopify.dev/tools/cli
Other
1.01k stars 201 forks source link

Validate on `shopify theme share/pull/push/serve` if users are running the command in a theme/empty directory #2680

Closed Poitrin closed 2 years ago

Poitrin commented 2 years ago

WHY are these changes introduced?

We want to…

WHAT is this pull request doing?

Requests a confirmation from the user to the following question …

It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed?

… if users …

[1] https://shopify.dev/themes/architecture#directory-structure-and-component-types

How to test your changes?

No confirmation needed

Part 1:

Part 2:

Confirmation needed

Part 1:

Part 2:

Post-release steps

Update checklist

mgmanzella commented 2 years ago

one more thing! i noticed when testing i select no to not proceed and from the CLI 3, the CLI hangs and doesn't exit. I have to ctrl-C to exit the CLI. have you seen this happen? (it could also be my setup so im skeptical there's actually a bug 😅 but thought i'd mention anyway)

Poitrin commented 2 years ago

i noticed when testing i select no to not proceed and from the CLI 3, the CLI hangs and doesn't exit. I have to ctrl-C to exit the CLI. have you seen this happen? (it could also be my setup so im skeptical there's actually a bug 😅 but thought i'd mention anyway)

Thanks for highlighting this! I will take a closer look again and then potentially add changes to https://github.com/Shopify/cli/pull/743 :-)