Skip to content

Conversation

xixixao
Copy link
Contributor

@xixixao xixixao commented Sep 20, 2025

I just burned half an hour thanks to this. Boolean coercion is evil. I was setting these options in CI, and due to a misconfiguration one of them was empty string. What was worse, I couldn't repro this locally, because if you have .env.local with CONVEX_DEPLOYMENT, and even if you're not logged in, npx convex deploy --url "" --admin-key "" does the right thing, but if you don't have .env.local, then you get erronously:

$ npx convex deploy --admin-key "" --url ""
You are currently developing anonymously with a locally running project. To deploy your Convex app to the cloud, log in by running `npx convex login`. See https://docs.convex.dev/production for more information on how Convex cloud works and instructions on how to set up hosting.

I'd turn on a lint rule that disallows boolean coercion altogether (I don't remember why we didn't do it in the past, maybe it didn't exist?).


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@xixixao
Copy link
Contributor Author

xixixao commented Sep 20, 2025

(another one for the != null camp :) )

@thomasballinger
Copy link
Collaborator

thomasballinger commented Sep 30, 2025

This is in get-convex/convex-backend@b5718c5, thank you!

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