on master help sign in
Use createDirectoryIfMissing instead of mkdir subprocess
commitd89b1a6b696903df0dd74f93bdc9c847ff99b80b authorLeon P Smith <leon.smith@obsidian.systems> dateFri 10 Jul 2020, 21:08 (6 years ago) parent9ab9daf
2 files changed+6−11
lib/command/src/Obelisk/Command/Deploy.hs+6−8 lib/command/src/Obelisk/Command/Utils.hs−3
lib/command/src/Obelisk/Command/Deploy.hs+6−8
@@ -85,14 +85,12 @@ deployInit' thunkPtr (DeployInitOpts deployDir sshKeyPath hostnames route adminE
8585 --accidentally create a production deployment that uses development
8686 --credentials to connect to some resources. This could result in, e.g.,
8787 --production data backed up to a dev environment.
88− withSpinner "Creating project configuration directories" $ do
89− callProcessAndLogOutput (Notice, Error) $
90− proc mkdirPath
91− [ "-p"
92− , deployDir </> "config" </> "backend"
93− , deployDir </> "config" </> "common"
94− , deployDir </> "config" </> "frontend"
95− ]
88+ withSpinner "Creating project configuration directories" $ liftIO $ do
89+ mapM_ (createDirectoryIfMissing True)
90+ [ deployDir </> "config" </> "backend"
91+ , deployDir </> "config" </> "common"
92+ , deployDir </> "config" </> "frontend"
93+ ]
9694
9795 let srcDir = deployDir </> "src"
9896 withSpinner ("Creating source thunk (" <> T.pack (makeRelative deployDir srcDir) <> ")") $ do
lib/command/src/Obelisk/Command/Utils.hs−3
@@ -39,9 +39,6 @@ mvPath = $(staticWhich "mv")
3939rmPath :: FilePath
4040rmPath = $(staticWhich "rm")
4141
42−mkdirPath :: FilePath
43−mkdirPath = $(staticWhich "mkdir")
44−
4542ghcidExePath :: FilePath
4643ghcidExePath = $(staticWhich "ghcid")
4744