mirror of
https://github.com/codedownio/sandwich.git
synced 2024-09-11 11:56:32 +03:00
Don't do createDirectoryLink on Windows noci
This commit is contained in:
parent
ef3f77214d
commit
ff3e0daf3f
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Test.Sandwich.Interpreters.StartTree (
|
||||
startTree
|
||||
@ -204,7 +205,12 @@ runInAsync node ctx action = do
|
||||
exists <- doesPathExist symlinkPath
|
||||
when exists $ removePathForcibly symlinkPath
|
||||
|
||||
#ifndef mingw32_HOST_OS
|
||||
-- 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?
|
||||
liftIO $ createDirectoryLink relativePath symlinkPath
|
||||
#endif
|
||||
|
||||
-- Write failure info
|
||||
whenJust baseContextPath $ \dir -> do
|
||||
|
Loading…
Reference in New Issue
Block a user