Open shmink opened 5 months ago
Not that there should be any difference, but could you just verify that it is the same in the latest version (v4.1.0)?
Unfortunately, I cannot due to dependency conflicts with the repo I work on. I was kind of hoping that some kind soul could just copy and paste my examples above as even creating a new project I run into other issues.
You most likely have your monorepo set up in the wrong way if you get a dependency conflict with melos, check the recommended structure here (only melos should be in the root workspace pubspec): https://melos.invertase.dev/getting-started#recommended-directory-structure
That structure looks like what I have but I'd rather stay on topic please.
It is on topic, because if you can't test with the latest version it is much harder for us to debug.
Fair enough. Finally managed to do it and yes the results are the same for v4.1
~/example
❯ melos --version
4.1.0
~/example
❯ ./test.sh "Hey there" "are" "you okay?"
arg 1: Hey there
arg 2: are
arg 3: you okay?
~/example
❯ cat melos.yaml
name: example
sdkPath: .fvm/flutter_sdk
packages:
- "*"
scripts:
test:
run: $MELOS_ROOT_PATH/test.sh
~/example
❯ melos test "Hey there" "are" "you okay?"
melos run test
└> $MELOS_ROOT_PATH/test.sh Hey there are you okay?
└> RUNNING
arg 1: Hey
arg 2: there
arg 3: are
melos run test
└> $MELOS_ROOT_PATH/test.sh Hey there are you okay?
└> SUCCESS
Still seems to be that melos sees any space as a separation in arguments ignoring cases where anything surrounded by speech marks should count as 1 argument.
In fact, in the final output it looks like "
has been stripped out all together.
melos run test
└> $MELOS_ROOT_PATH/test.sh Hey there are you okay?
└> SUCCESS
Can you try just doing MELOS_ROOT_PATH
, without the $
?
Is there an existing issue for this?
Version
3.2.0
Description
There's similar issues but I don't think they're exact in the same issues I'm seeing.
It seems to be that one can pass arguments to a melos script just as you would a bash script but the issue is that melos isn't working out where one argument begins and ends correctly.
Steps to reproduce
For example, from my
melos.yaml
file I have the followingThat
test.sh
file is belowIf I run the script directly I get the following
If I run the melos version which is just pointing at the same script it does accept the arguments but I don't think it takes
" "
speech marks into account.It looks like it sees ANY space as a separation in arguments.
Expected behavior
I would expect
Screenshots
No response
Additional context and comments
No response