Enable log folding in Travis CI (#10414)

Prevent log truncation in browsers
This commit is contained in:
Federico Ceratto 2019-01-22 14:50:50 +00:00 • committed by Andreas Rumpf
commit 54fecdb8df
2 changed files with 23 additions and 11 deletions

View file

@ -38,6 +38,15 @@ proc exec*(cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
if execShellCmd(cmd) != 0: quit("FAILURE", errorcode)
putEnv("PATH", prevPath)
proc execFold*(desc, cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
## Execute shell command. Add log folding on Travis CI.
# https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719
if existsEnv("TRAVIS"):
echo "travis_fold:start:" & desc.replace(" ", "")
exec(cmd, errorcode, additionalPath)
if existsEnv("TRAVIS"):
echo "travis_fold:end:" & desc.replace(" ", "")
proc execCleanPath*(cmd: string,
additionalPath = ""; errorcode: int = QuitFailure) =
# simulate a poor man's virtual environment