diff --git a/test/ipfs-test-lib.sh b/test/ipfs-test-lib.sh index c2e804a2b..fc856df47 100644 --- a/test/ipfs-test-lib.sh +++ b/test/ipfs-test-lib.sh @@ -1,5 +1,9 @@ # Generic test functions for go-ipfs +ansi_strip() { + sed 's/\x1b\[[0-9;]*m//g' +} + # Quote arguments for sh eval shellquote() { _space='' @@ -48,7 +52,7 @@ test_path_cmp() { # This takes a Dockerfile, and a build context directory docker_build() { - docker build --rm -f "$1" "$2" + docker build --rm -f "$1" "$2" | ansi_strip } # This takes an image as argument and writes a docker ID on stdout