VSTS

"the input device is not a TTY" error running docker on VSTS build agent

  • Posted on: 22 November 2017
  • By: Ed Elliott

I have been playing around with including all my build dependencies in docker for windows lately and had a build that kept giving me this error in the build log:

"the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'"

The command I had been running was along the lines of:

docker exec -it powershell.exe ./some/script.ps1

The problem was that I was using -it which means "interactive" and "create a virtual TTY", to run my script I needed neither of those so took them off. The command then failed and I could see the actual error message which allowed me to find the real problem, instead of seeing a message about the TTY because the docker exec command failed for some other reason (container not running, powershellexe instead of powershell.exe lol).

Anyone hope it helps someone, if you get this error then the root cause is something else, and you don't need -it on docker exec when you run exec a script in a docker container as part of a build.

Tags: 

How do I use VSTS variables in YAML CI Build definitions?

  • Posted on: 21 November 2017
  • By: Ed Elliott

Hey, VSTS YAML builds are my new favorite thing, by like a million miles.

If you have a yaml build definition ( .vsts-ci.yml ) and you want to use one of the build variables then it isn't totally clear how to include them in a definition (it hasn't been out long so I expect more docs to come soon), while we wait for the docs if you want to use one of the variables from https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions... use this format:


$(Build.SourcesDirectory)

Simple! On the page https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions... each variable has two definitions, use the top one so Build.Thing rather than the upper case single word like BUILD_THING.

ok?

Tags: