File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ module Spago.Paths where
2
2
3
3
import Prelude
4
4
5
+ import Data.Array (cons , replicate , reverse )
6
+ import Data.String (joinWith )
7
+ import Effect.Class (class MonadEffect , liftEffect )
5
8
import Effect.Unsafe (unsafePerformEffect )
6
9
import Node.Path (FilePath )
7
10
import Node.Path as Path
8
11
import Node.Process as Process
9
- import Data.Array (cons , replicate , reverse )
10
- import Data.String (joinWith )
11
12
12
13
type NodePaths =
13
14
{ config :: FilePath
@@ -22,6 +23,9 @@ foreign import paths :: NodePaths
22
23
cwd :: FilePath
23
24
cwd = unsafePerformEffect (Process .cwd)
24
25
26
+ chdir :: forall m . MonadEffect m => FilePath -> m Unit
27
+ chdir dir = liftEffect $ Process .chdir dir
28
+
25
29
mkRelative :: FilePath -> FilePath
26
30
mkRelative = Path .relative cwd
27
31
You can’t perform that action at this time.
0 commit comments