maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Env variables with spaces in value

Open dgreasi opened this issue 1 year ago • 0 comments

Describe the bug I am trying to use env variables with spaces for text in my react native app. It seems that the .env.maestro file is not behaving like a usual .env file in Javascript.

I am getting the following error:

Unmatched argument at index -1: '7 Laverton Mews, London SW5'

To Reproduce

  1. Create your .env.maestro file in the root of your project with the following content
-e RUN_CURRENT_ORDER_FLOW=true
-e RUN_NEW_ORDER_FLOW=true
-e UK_ADDRESS_INPUT="7 Laverton Mews, London SW5"
  1. Run your test
maestro test -e APP_ID=${YOUR_APP_ID} .maestro/e2eFlow.yaml @.env.maestro

I also tried single quotes but I got the same.

if you try without the last line of the env file it's working as expected.

Expected behavior Not failing when using such env variables

Environment information (please complete the following information):

  • Maestro version [e.g. v1.2.3]
  • Platform: iOS/Android
  • Framework: React Native
  • Device model and OS version: iPhone 15, Pixel 6a
  • Simulator, emulator and physical device
  • Host Mac M2

dgreasi avatar Apr 24 '24 15:04 dgreasi