-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat!: support multiline values in env files #10826
Conversation
Thanks for splitting the PR! It would be nice if we could have a better error message for #6858. |
@sapphi-red I'm trying to fix |
Unless we have a hardcoded error check for the split undefined bug, I think it would be nicer if it's fixed upstream 🤔 |
Can we re-implement dotenv-expand in vite? |
I think it's better to keep it upstream for now so it gets bug fixes and we can refer to its docs. |
Yeah, I think it would be better to be fixed in upstream. But until that get fixed, I think we should improve the error message on our side. Something like: try {
expand()
} catch (e) {
if (e.message.includes('split') {
throw new Error('dotenv-expand failed to expand env vars. Maybe you need to escape `$`?')
}
throw e
} Without that, I suppose we'll receive many bug reports. |
I'd be fine with a custom error check for now too 👍 |
Let's merge and improve the error message in a follow-up PR. Let us know if you want to take that @Dunqing. I want to include this already in the next patch. |
@Dunqing Just to confirm, do you plan to take the error one? I'll take that if you don't. |
Sorry, I'll do that soon. |
@Dunqing OK. No rush 👍🏼 |
Co-authored-by: bluwy <[email protected]> close vitejs#10149
Description
close: #10149
related PR: #10370
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).