Skip to content

Commit 2869144

Browse files
committed
fix #48
1 parent b847d29 commit 2869144

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

waspc/packages/prisma/src/format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function formatSchema(
2525
const process = spawn(
2626
"npx",
2727
["prisma", "format", "--schema", tmpPrismaSchemaFile.path],
28-
{},
28+
{shell: true},
2929
);
3030
process.stderr.on("data", (data) => {
3131
stderr += data;

waspc/src/Wasp/Job/Process.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ runNodeCommandAsJobWithExtraEnv extraEnvVars fromDir command args jobType chan =
100100
NodeVersion.VersionCheckFail errorMsg -> exitWithError (ExitFailure 1) (T.pack errorMsg)
101101
NodeVersion.VersionCheckSuccess -> do
102102
envVars <- getAllEnvVars
103-
let nodeCommandProcess = (P.proc command args) {P.env = Just envVars, P.cwd = Just $ SP.fromAbsDir fromDir}
103+
let nodeCommandProcess = (P.shell fullCommand) {P.env = Just envVars, P.cwd = Just $ SP.fromAbsDir fromDir}
104104
runProcessAsJob nodeCommandProcess jobType chan
105105
where
106106
-- Haskell will use the first value for variable name it finds. Since env
@@ -119,3 +119,4 @@ runNodeCommandAsJobWithExtraEnv extraEnvVars fromDir command args jobType chan =
119119
J._jobType = jobType
120120
}
121121
return exitCode
122+
fullCommand = unwords $ command : args

waspc/src/Wasp/Node/Version.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ where
99

1010
import Data.Conduit.Process.Typed (ExitCode (..))
1111
import System.IO.Error (catchIOError, isDoesNotExistError)
12-
import System.Process (readProcessWithExitCode)
12+
import System.Process (readCreateProcessWithExitCode, shell)
1313
import Wasp.Node.Internal (parseVersionFromCommandOutput)
1414
import qualified Wasp.SemanticVersion as SV
1515
import qualified Wasp.SemanticVersion.VersionBound as SV
@@ -76,7 +76,7 @@ readCommandOutput :: String -> [String] -> IO (Either ErrorMessage String)
7676
readCommandOutput commandName commandArgs = do
7777
commandResult <-
7878
catchIOError
79-
(Right <$> readProcessWithExitCode commandName commandArgs "")
79+
(Right <$> readCreateProcessWithExitCode (shell fullCommand) "")
8080
(return . Left . wrapCommandIOErrorMessage . makeIOErrorMessage)
8181
return $ case commandResult of
8282
Left procErr -> Left procErr

waspc/src/Wasp/NodePackageFFI.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,6 @@ packageCreateProcess ::
124124
String ->
125125
[String] ->
126126
P.CreateProcess
127-
packageCreateProcess packageDir cmd args = (P.proc cmd args) {P.cwd = Just $ fromAbsDir packageDir}
127+
packageCreateProcess packageDir cmd args = (P.shell fullCommand) {P.cwd = Just $ fromAbsDir packageDir}
128+
where
129+
fullCommand = unwords $ cmd : args

0 commit comments

Comments
 (0)