From 03dfd0cba003bcdf7d6fcdcf41f8df3fa93abf6a Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 23 May 2022 23:50:26 +0200 Subject: [PATCH] Require --isolate to have an absolute directory, fixes #367 --- app/ghcup/GHCup/OptParse/Common.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ghcup/GHCup/OptParse/Common.hs b/app/ghcup/GHCup/OptParse/Common.hs index 234fcbb..dba8664 100644 --- a/app/ghcup/GHCup/OptParse/Common.hs +++ b/app/ghcup/GHCup/OptParse/Common.hs @@ -226,7 +226,7 @@ absolutePathParser f = case isValid f && isAbsolute f of False -> Left "Please enter a valid absolute filepath." isolateParser :: FilePath -> Either String FilePath -isolateParser f = case isValid f of +isolateParser f = case isValid f && isAbsolute f of True -> Right $ normalise f False -> Left "Please enter a valid filepath for isolate dir."