From 262583133e4965977b8340eb9ae125f7ad5c1751 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sat, 30 Jan 2021 11:01:20 +0100 Subject: [PATCH] Dereference potential linked launch.sh file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It can be useful to have launch.sh linked somewhere outside the repository clone. For instance to expose launch.sh in the $PATH. Exposing launch.sh with a symbolic link outside the git repository breaks poezio execution through launch.sh. “ cd dirname "$0" ” will get to the directory holding the link and not within the git repository. --- launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch.sh b/launch.sh index 14d8c071..57537631 100755 --- a/launch.sh +++ b/launch.sh @@ -1,5 +1,5 @@ #!/bin/sh -cd $(dirname "$0") +cd $(dirname "$(readlink -f "$0")") if [ -z "$POEZIO_VENV" ] then POEZIO_VENV="poezio-venv"