Re: [O] use a src block's result as input of another src block report error: the input device is not a TTY

2017-12-19 Thread Neil Jerram
Remove the -it options, which I believe you don't need for executing a simple 
command like pwd.

(-it is what you use to execute a shell or other interactive command in a 
container, and requires there to be a tty.)

Best wishes - Neil


On 19 December 2017 12:59:19 GMT+00:00, "numbch...@gmail.com" 
 wrote:
>Here is my example:
>
>#+NAME: get-container-name
>#+begin_src shell :results output
>echo $(docker ps --format="{{.Names}}")
>#+end_src
>
>#+RESULTS: get-container-name
>: elastic_thompson
>
>#+begin_src shell :var container_name=get-container-name :noweb yes
>docker exec -it $container_name pwd
># docker exec -it <> pwd
>#+end_src
>
>#+RESULTS:
>
>But I got error:
>
>#+begin_example
>the input device is not a TTY
>#+end_example
>
>
>[stardiviner] GPG key ID: 47C32433
>IRC(freeenode): stardiviner Twitter:  @numbchild
>Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
>Blog: http://stardiviner.github.io/


[O] use a src block's result as input of another src block report error: the input device is not a TTY

2017-12-19 Thread numbch...@gmail.com
Here is my example:

#+NAME: get-container-name
#+begin_src shell :results output
echo $(docker ps --format="{{.Names}}")
#+end_src

#+RESULTS: get-container-name
: elastic_thompson

#+begin_src shell :var container_name=get-container-name :noweb yes
docker exec -it $container_name pwd
# docker exec -it <> pwd
#+end_src

#+RESULTS:

But I got error:

#+begin_example
the input device is not a TTY
#+end_example


[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/