mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 21:37:57 +08:00
strip ANSI sequences from docker build output
sharness was failing because an ANSI reset sequence was getting inserted at the beginning of the line. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
parent
a7acb77889
commit
de02525594
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user