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

fix: Cannot specify -d <deviceName> when deviceName includes single quote #700

Open
1 task done
roberthartman opened this issue Apr 17, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@roberthartman
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Version

3.4.0

Description

I am using melos dev -- -d "Robert’s iPhone" to pass the -d option to my dev script, which runs flutter run:

dev:
    run: melos exec -- flutter run --flavor development lib/main_development.dart

This works, as long as the in "Robert’s" is not ' (specifically, note that the former has a bit of forward leans, the latter ' does not. I'll call the former "apostrophe" and the latter "single quote"). If I change my phone's name in iOS to use single quote, and then use a single quote in my arguments to the melos script, the script fails with:

/bin/sh: eval: line 0: unexpected EOF while looking for matching `''
/bin/sh: eval: line 1: syntax error: unexpected end of file

I have tried escaping the single quote, wrapping Robert's iPhone with backticks, and nothing works. However, if I call flutter run directly, the single quote is not a problem: flutter run --flavor development lib/main_development.dart -d "Robert's iPhone"

Steps to reproduce

See description.

Expected behavior

There should be a way to pass arguments containing single quote(s) to a script.

Screenshots

No response

Additional context and comments

No response

@roberthartman roberthartman added the bug Something isn't working label Apr 17, 2024
@spydon
Copy link
Collaborator

spydon commented Apr 17, 2024

Try to escape the single quote: `"Robert's iPhone"

@roberthartman
Copy link
Author

Try to escpape the single quote: `"Robert's iPhone"

@spydon I did try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants