Skip to content

Conversation

@PetrNovota
Copy link
Collaborator

when using cat some_script.sh | bash syntax, the read command does not work when not specified directly that it should read from terminal. That can be done by using read meassage < /dev/tty

@Erol444 Erol444 linked an issue Jan 27, 2023 that may be closed by this pull request
@PetrNovota
Copy link
Collaborator Author

@themarpe can we merge this PR? It is a simple local fix, does not affect anything else and it is critical for the linux installation to work properly on linux

@themarpe
Copy link
Collaborator

Seems like my review got lost - I'm not too keen on the /dev/tty, but lets go with it for the time being

@themarpe themarpe merged commit 6620b10 into luxonis:main Jan 30, 2023
@PetrNovota
Copy link
Collaborator Author

@themarpe I have not found any other solution. I tested it on macOS as well as on linux and it looks like it works.
Do you have some other idea how to do it?

@themarpe
Copy link
Collaborator

themarpe commented Jan 30, 2023

No ideas on top of my head - if /dev/tty is "well defined" to be an alternate means of reading from current tty, then this is okay.
Though, this might likely fail on eg Docker installations with no tty then?

Perhaps a check would be an option, and otherwise user input would be skipped & defaults taken into account

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

Successfully merging this pull request may close these issues.

[BUG] bash: line 231: cho: command not found

2 participants