melos icon indicating copy to clipboard operation
melos copied to clipboard

fix: ENV is not working on windows

Open abdalazeez1 opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

  • [ ] I have searched the existing issues.

Version

3.1.1

Description

i am trying to run this script on windows but it's not work . i test it on ubuntu it's work fine. can anyone help me how to struct ENV in windows .

this is my script from DOCS : hello: name: hey description: Greet the world run: echo $GREETING env: GREETING: 'Hey'

Steps to reproduce

1 create empty files 2 copy script 3 and run it from cmd

Expected behavior

echo Hey

Screenshots

No response

Additional context and comments

No response

abdalazeez1 avatar Jul 24 '23 14:07 abdalazeez1

smae here

https://github.com/invertase/melos/issues/306

abdalazeez1 avatar Jul 24 '23 14:07 abdalazeez1

+1 . I confirm it's not working with neither CMD nor Powershell syntaxes.

Mounir-Bouaiche avatar Jul 31 '23 12:07 Mounir-Bouaiche

@Mounir-Bouaiche @abdalazeez1 Will this issue be fixed? Please provide an update on this issue.

sagarwanojwar03 avatar Apr 24 '24 06:04 sagarwanojwar03

Up. Neither %SYNTAX% nor $SYNTAX is working. This won't work when using 'run'. Works when using 'exec' My use case is to create a script that creates a new package easily: fvm flutter create -t package --project-name packageNameHere ./packages/packageNameHere and need to pass packageNameHere as arg

codakkk avatar Aug 08 '24 09:08 codakkk

As a workaround, can you use an environment variable instead to pass it in? So something like:

set packageName=packageNameHere

And in your script definition:

fvm flutter create -t package --project-name %packageName% ./packages/%packageName

spydon avatar Aug 08 '24 10:08 spydon