From 1a2d5040a2280f20941a1b26877c4264cea7a1ef Mon Sep 17 00:00:00 2001 From: Marios Andreou Date: Mon, 2 Jul 2018 17:53:02 +0300 Subject: [PATCH] Reproducer don't fail if workspace path doesn't exist yet If the workspace path doesn't exist then realpath fails realpath: /the/final/result/: No such file or directory. This minor edit ensures we don't fail in such cases since the workspace is created anyway later on in the script. Change-Id: Idea203eddc649a1ad7c17593d8ddc52c703383b7 --- .../templates/reproducer-quickstart.sh.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 b/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 index 92e4b23e4..bb0e218b9 100644 --- a/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 +++ b/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 @@ -77,7 +77,8 @@ while [ "x$1" != "x" ]; do case "$1" in --workspace|-w) - WORKSPACE=$(realpath $2) + # realpath fails if /some/path doesn't exist. It is created l8r + WORKSPACE=$(realpath $2 || echo -n $2) shift ;;