[
https://issues.apache.org/jira/browse/MYNEWT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15433746#comment-15433746
]
Christopher Collins commented on MYNEWT-361:
--------------------------------------------
It appears the problem is indeed that the docker tty steals the subsequent
lines. Replacing the newt script with the following solved the problem for me:
{noformat}
#!/bin/bash
if [ "$1" = "debug" ] || [ "$1" = "run" ]
then
ti="-ti"
fi
docker run -e NEWT_USER=$(id -u) -e NEWT_GROUP=$(id -g) -e NEWT_HOST=$(uname)
$ti --rm --device=/dev/bus/usb --privileged -v $(pwd):/workspace -w /workspace
mynewt/newt:latest /newt "$@"
{noformat}
This script only allocates a tty in the docker instance if the user issues an
interactive newt command ("debug" or "run"). The interactive commands start a
gdb instance, which is why they require input from the user.
I will open a pull request to replace the script on the mynewt page. In the
meantime, you might want to use the above script.
Thanks again,
Chris
> Consecutive commands not run in terminal
> ----------------------------------------
>
> Key: MYNEWT-361
> URL: https://issues.apache.org/jira/browse/MYNEWT-361
> Project: Mynewt
> Issue Type: Bug
> Components: Newt
> Affects Versions: v0_9_0
> Environment: Ubuntu 14.10 using the Docker version of newt
> Reporter: Tim
> Assignee: Christopher Collins
> Priority: Minor
> Fix For: v1_0_0_beta1
>
>
> Basically, paste a few newt commands into a terminal, like this:
> newt target create nrf52_boot
> newt target set nrf52_boot app=@apache-mynewt-core/apps/boot
> newt target set nrf52_boot bsp=@apache-mynewt-core/hw/bsp/nrf52dk
> newt target set nrf52_boot build_profile=optimized
> My expected behaviour is that each one executes after the previous one has
> finished. What actually happens is that only the first commands execute. The
> others don't do anything (not even an error).
> You can actually see this easier like this:
> newt target show
> newt target show
> vs
> newt target show && newt target show
> If I paste this it works as expected, so I'm not sure what newt does
> differently (does it fork and run in the background or something weird?)
> sleep 1
> ls
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)