From 519aa2048ad9ca3f5d2a56906ff9feb3743bf746 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Sun, 13 Sep 2020 14:01:59 +0430 Subject: [PATCH] Shell: Use a subshell instead of explicitly calling a shell binary in a test This commit fixes a FIXME in a test, as we have subshells now. --- Shell/Tests/sigpipe.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Shell/Tests/sigpipe.sh b/Shell/Tests/sigpipe.sh index e24fd731fb7..1866b506bad 100644 --- a/Shell/Tests/sigpipe.sh +++ b/Shell/Tests/sigpipe.sh @@ -5,9 +5,7 @@ # created. rm -f sigpipe.sh.out -# FIXME: It'd be nice if there was a way to create a subshell that makes -# fewer assumptions about cwd and the build directory name. -Build/Meta/Lagom/shell -c 'echo foo && echo bar && echo baz > sigpipe.sh.out' | head -n 1 > /dev/null +{ echo foo && echo bar && echo baz > sigpipe.sh.out } | head -n 1 > /dev/null # Failing commands don't make the test fail, just an explicit `exit 1` does. # So the test only fails if sigpipe.sh.out exists (since then `exit 1` runs),