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

--handle-input not working with Expo? #516

Open
FezVrasta opened this issue Nov 12, 2024 · 5 comments
Open

--handle-input not working with Expo? #516

FezVrasta opened this issue Nov 12, 2024 · 5 comments

Comments

@FezVrasta
Copy link

  • Description: I'm trying to run expo start along with another command, I'm using --handle-input but nothing happens when I press r (reload) or i (open on iOS)
  • Expected Behavior: I would expect the commands to be forwarded to the Expo CLI
  • Environment: macOS, Node lts/jod
  • Reproduction: concurrently -k -n 'mobile-client,backend' -c 'red,green' --handle-input 'yarn expo start' 'yarn workspace backend run dev'
@gustavohenke
Copy link
Member

Sounds like it's detecting whether it's in TTY mode. I don't know how this is used, but the function name is pretty suggestive:

https://github.com/expo/expo/blob/988261c1a1405aca1f0a32f28bf068306aa03a8c/packages/%40expo/cli/src/utils/interactive.ts#L4-L5

If you pass the --raw flag to concurrently, expo might respond - but at the cost of not having output prefixed.

It'd be cool to have some env variable to force interactivity.

@FezVrasta
Copy link
Author

Thanks. Do you think the raw option could be enabled just for a specific command rather than for all of them? So that I can have the output prefixed for all the other commands I run?

@gustavohenke
Copy link
Member

Yep, this should already be possible today though through API mode.

concurrently([
	{ name: '...', command: 'foo', raw: true },
	{ name: '...', command: 'bar' } // raw: false by default
])

Docs (it's lacking raw in there, but it works)

That said, I wouldn't say no to making the CLI --raw flag accept indices/names as a way to pick which commands use it.

@FezVrasta
Copy link
Author

so would it be --raw 0 and/or --raw label-a right? Could it support multiple raws at the same time? (--raw 0 --raw 1)?

@gustavohenke
Copy link
Member

Yes, but I'd favour using comma separators like in most other flags that accept multiple inputs (e.g. --prefix-colors, --names or --success), so --raw foo,bar,1,2,3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants