From 4c09012b0d8f412f7e23613edcc32979384611d6 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 29 Dec 2020 12:48:11 +0100 Subject: [PATCH] tests: Don't rely on $HOME existing Apparently the launchpad tests run with $HOME set to a nonexistent directory. Since we just want *out*, let's just store the previous dir and go back. --- tests/checks/glob.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/checks/glob.fish b/tests/checks/glob.fish index 8777b6117..bb75d23e0 100644 --- a/tests/checks/glob.fish +++ b/tests/checks/glob.fish @@ -1,5 +1,6 @@ # RUN: %fish %s +set -l oldpwd $PWD cd (mktemp -d) set tmpdir (pwd -P) @@ -85,5 +86,5 @@ string join \n **/bar | sort # CHECK: foo/bar # Clean up. -cd $HOME +cd $oldpwd rm -Rf $tmpdir