Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --customer-account-push flag when no domain is set in .env #2007

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

frandiox
Copy link
Contributor

Related to #1992

A bit of a tricky issue:

  • Right now, if you pass --customer-account-push__unstable and have no PUBLIC_STORE_DOMAIN in .env, it will think you're using mock.shop and skip the tunnel. This would be correct if we had all the variables at this point, but this is only considering local variables. The domain might be injected later from remote/admin variables.
  • A value like PUBLIC_STORE_DOMAIN="" in .env overwrites remote values and uses mock.shop. We still need to disable tunnel in this case.

To 🎩 , ensure --customer-account-push__unstable has the expected behavior when:

  • PUBLIC_STORE_DOMAIN is set to a real domain (e.g. hydrogen-preview.myshopify.com) in .env => starts the tunnel + no warning.
  • PUBLIC_STORE_DOMAIN is undefined in .env => starts the tunnel + no warning.
  • PUBLIC_STORE_DOMAIN is set to mock.shop in .env => skips the tunnel + info banner in terminal about mock.shop.
  • PUBLIC_STORE_DOMAIN is empty string in .env => skips the tunnel + info banner in terminal about mock.shop.

@frandiox frandiox requested a review from a team April 16, 2024 12:01
Copy link
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset.
If the changes are user-facing and should cause a version bump, run npm run changeset add to track your changes and include them in the next release CHANGELOG.
If you are making simple updates to examples or documentation, you do not need to add a changeset.

@frandiox frandiox merged commit c8d733b into main Apr 16, 2024
15 checks passed
@frandiox frandiox deleted the fd-mockshop-capush branch April 16, 2024 16:29
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.

2 participants