Skip to content

Commit

Permalink
ci: fix another warning
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jul 26, 2024
1 parent d31aef6 commit 0275c47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sandwich/src/Test/Sandwich/Interpreters/StartTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ runInAsync node ctx action = do
whenJust baseContextErrorSymlinksDir $ \errorsDir ->
whenJust baseContextPath $ \dir -> do
whenJust baseContextRunRoot $ \runRoot -> do
-- Get a relative path from the error dir to the results dir. System.FilePath doesn't want to
-- introduce ".." components, so we have to do it ourselves
let errorDirDepth = L.length $ splitPath $ makeRelative runRoot errorsDir

let symlinkBaseName = case runTreeLoc of
Nothing -> takeFileName dir
Just loc -> [i|#{srcLocFile loc}:#{srcLocStartLine loc}_#{takeFileName dir}|]
Expand All @@ -235,6 +231,10 @@ runInAsync node ctx action = do
when exists $ removePathForcibly symlinkPath

#ifndef mingw32_HOST_OS
-- Get a relative path from the error dir to the results dir. System.FilePath doesn't want to
-- introduce ".." components, so we have to do it ourselves
let errorDirDepth = L.length $ splitPath $ makeRelative runRoot errorsDir

-- Don't do createDirectoryLink on Windows, as creating symlinks is generally not allowed for users.
-- See https://security.stackexchange.com/questions/10194/why-do-you-have-to-be-an-admin-to-create-a-symlink-in-windows
-- TODO: could we detect if this permission is available?
Expand Down

0 comments on commit 0275c47

Please sign in to comment.