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

eas env:pull does not properly escape env variables which contain a # #2813

Open
tikotzky opened this issue Jan 12, 2025 · 2 comments
Open

Comments

@tikotzky
Copy link

Build/Submit details page URL

No response

Summary

I have an env variable which contains a hex color code, for example #ffffff
When pulling using eas:pull it generates an env file containing

ENV_VARIABLE=#99ccff

when parsing the env file (using dotenv) it treats the # as the start of a comment and ignores the rest of the line.
as per the dotenv docs the value should be wrapped in quotes if it contains a #
see: https://github.com/motdotla/dotenv#comments

Managed or bare?

Bare

Environment

expo-env-info 1.2.2 environment info:
System:
OS: macOS 15.1.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.20.5 - ~/.volta/tools/image/node/18.20.5/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 10.8.2 - ~/.volta/tools/image/node/18.20.5/bin/npm
Managers:
CocoaPods: 1.16.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.2, iOS 18.2, macOS 15.2, tvOS 18.2, visionOS 2.2, watchOS 11.2
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8512546
Xcode: 16.2/16C5032a - /usr/bin/xcodebuild
npmPackages:
expo: ^52.0.23 => 52.0.23
expo-router: ~4.0.15 => 4.0.15
react: 18.3.1 => 18.3.1
react-native: 0.76.5 => 0.76.5
Expo Workflow: bare

Error output

No response

Reproducible demo or steps to reproduce from a blank project

eas env:create --name TEST --value #ffffff --type string --visibility plaintext --environment development
eas env:pull --environment development

The generated .env.local will contain TEST=#ffffff and therefor will not properly load the env variable.
Manually correcting the variable to be wrapped in quotes, like this`TEST="#ffffff" correctly loads the env variable.

@tikotzky tikotzky added the needs review Issue is ready to be reviewed by a maintainer label Jan 12, 2025
@tikotzky
Copy link
Author

It seems like the values would need to wrapped in quotes on these line

@szdziedzic szdziedzic added issue accepted eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Jan 13, 2025
@expo-bot
Copy link
Contributor

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants