feat: Add support for loading environment variables from .env files#3127
Open
sailsdima wants to merge 9 commits intomobile-dev-inc:mainfrom
Open
feat: Add support for loading environment variables from .env files#3127sailsdima wants to merge 9 commits intomobile-dev-inc:mainfrom
sailsdima wants to merge 9 commits intomobile-dev-inc:mainfrom
Conversation
added 6 commits
April 2, 2026 09:29
# Conflicts: # maestro-cli/build.gradle.kts
9f35111 to
e3351b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR adds a new
--env-fileCLI option that allows loading environment variables from a.envfile instead of passing them one-by-one with-e. The support is added for commands:test,record, andcloud.EnvFileParser- parses .env files into key-value map.TestCommand,RecordCommandandCloudCommandcall merge .env file with environment map logic.File parser supports:
NAME=VALUE# CommentNAME=VALUE # CommentNAME='Quote 1 # no-comment'ORNAME="Quote 2 # no-comment". Usage:COLOR="#FFFFFF"Usage example:
Note: if both
--env-fileand-eused, env variables added via-ewill override values with the same name from--env-file.copilot:summary
Testing
Created a new e2e test with tag
env-file-orientationthat uses--env-filewhich is based on Maestro Orientation sample app. Updatedrun_testsscript to use it.Usage for local run:
Issues fixed
#2817