1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

hack/make.ps1: know where we failed

In case of an exception, it makes great sense to print out some
information telling where exactly it happened.

_.InvocationInfo.PositionMessage gives script name, line number,
character position and (depending on the PS version) highlights
the part where error has happened.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2018-08-27 18:00:55 -07:00
parent 0c5f8d2b9b
commit d2788cb2f0

View file

@ -437,6 +437,7 @@ Try {
}
Catch [Exception] {
Write-Host -ForegroundColor Red ("`nERROR: make.ps1 failed:`n$_")
Write-Host -ForegroundColor Red ($_.InvocationInfo.PositionMessage)
# More gratuitous ASCII art.
Write-Host