Skip to content

Commit

Permalink
Do not use env to run git and make
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubfijalkowski committed Jun 10, 2020
1 parent ffa04dd commit 43904fd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,19 @@ execMake verbosity build_target target = do
Just p -> p
#endif
Nothing -> "make"
baseArgs = if null build_target
then [makeExec, "--directory=libsass"]
else ["BUILD=" ++ build_target, makeExec, "--directory=libsass"]
makeArgs = if null target
baseArgs = ["--directory=libsass", if null target then "all" else target]
makeArgs = if null build_target
then baseArgs
else baseArgs ++ [target]
rawSystemExit verbosity "env" makeArgs
else baseArgs ++ ["BUILD=" ++ build_target]
rawSystemExit verbosity makeExec makeArgs

updateLibsassVersion :: ConfigFlags -> IO ()
updateLibsassVersion flags = do
let verbosity = fromFlag $ configVerbosity flags
exists <- doesFileExist "libsass/VERSION"
unless exists $ do
ver <- rawSystemStdout verbosity "env" [ "git", "-C", "libsass", "describe",
"--abbrev=4", "--dirty", "--always", "--tags" ]
ver <- rawSystemStdout verbosity "git" ["-C", "libsass", "describe",
"--abbrev=4", "--dirty", "--always", "--tags"]
writeFile "libsass/VERSION" ver


Expand Down

0 comments on commit 43904fd

Please sign in to comment.