drone icon indicating copy to clipboard operation
drone copied to clipboard

stty command doesn't understand --file under MacOSX

Open davehylands opened this issue 6 years ago • 2 comments

When I run just itm with my Black Magic Probe attached, I get this error:

831 >just itm
drone probe itm --reset 0,1 -- 0,1
stty: illegal option -- --file=/dev/tty.usbmodem7ABA4DC13
usage: stty [-a|-e|-g] [-f file] [options]
Error: `"stty" "--file=/dev/tty.usbmodem7ABA4DC13" "speed" "115200" "raw"` exited with status code: 1
error: Recipe `itm` failed on line 72 with exit code 1

And if I manually run stty:

$ stty --file=/dev/tty.usbmodem7ABA4DC13 
stty: illegal option -- --file=/dev/tty.usbmodem7ABA4DC13
usage: stty [-a|-e|-g] [-f file] [options]
$ stty -f /dev/tty.usbmodem7ABA4DC13 
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb

davehylands avatar Apr 25 '20 22:04 davehylands

It looks like its more complicated that just -f. I manually tried running the full command:

$ stty -f /dev/tty.usbmodem7ABA4DC13 speed 115200 raw
9600

and its still reporting 9600. Running with sudo doesn't make any difference.

davehylands avatar Apr 25 '20 23:04 davehylands

I don't use Mac, so I can't debug it. If you manage stty to work when you run it manually on your machine, I will be glad to fix drone CLI.

valff avatar Apr 28 '20 08:04 valff