From 96785fcf2cb44e76ab8db7079245021b1b520f8c Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Fri, 5 Jan 2018 11:26:02 +0100 Subject: [PATCH] TT#29621 Set LC_ALL=C.UTF-8 to fix shellcheck error: hGetContents: invalid argument shellcheck before version 0.4.7 has an error: > source/somefile: hGetContents: invalid argument (invalid byte sequence) The issue is reported and fixed here https://github.com/koalaman/shellcheck/issues/324 Since we are in Jessie and using version 0.3.4 we need to set locale properly. Change-Id: I92cf75dec4b40d32650375867b97dc7f4ee868a3 --- t/tap-tests-docker/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/tap-tests-docker/Dockerfile b/t/tap-tests-docker/Dockerfile index e359971..276d752 100644 --- a/t/tap-tests-docker/Dockerfile +++ b/t/tap-tests-docker/Dockerfile @@ -5,7 +5,7 @@ FROM docker.mgm.sipwise.com/sipwise-jessie:latest # is updated with the current date. It will force refresh of all # of the base images and things like `apt-get update` won't be using # old cached versions when the Dockerfile is built. -ENV REFRESHED_AT 2018-01-04 +ENV REFRESHED_AT 2018-01-05 RUN echo "# generated by Dockerfile from jenkins-tap-test-jessie at $(date)\n\ deb https://deb.sipwise.com/autobuild/ internal-jessie main\n" > /etc/apt/sources.list.d/sipwise-internal.list @@ -33,7 +33,10 @@ rm -rf /tmp/zzz COPY t/tap-tests-docker/perlcriticrc /root/.perlcriticrc -RUN echo 'SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher' >>/root/.bash_history +# Set LC_ALL, otherwise shellcheck before v0.4.7 fails: +# source/somefile: hGetContents: invalid argument (invalid byte sequence) +# https://github.com/koalaman/shellcheck/issues/324 +RUN echo 'LC_ALL=C.UTF-8 SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher' >>/root/.bash_history WORKDIR /code/ @@ -52,6 +55,6 @@ WORKDIR /code/ # % docker run --rm -i -t -v $(pwd):/code/source:rw docker.mgm.sipwise.com/jenkins-tap-test-jessie:latest bash # # Inside docker (the command is in history, just press UP button): -# SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher +# LC_ALL=C.UTF-8 SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher # ################################################################################