Skip to content

Commit

Permalink
Merge pull request #313 from serokell/int-index/no-shell
Browse files Browse the repository at this point in the history
[Chore] Use `proc` instead of `shell` to call `git`
  • Loading branch information
int-index authored Jan 6, 2025
2 parents 2c50693 + 32b2f72 commit fd35008
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Xrefcheck/Scan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import Data.Map qualified as M
import Data.Reflection (Given)
import Fmt (Buildable (..), Builder, fmtLn)
import System.Directory (doesDirectoryExist, pathIsSymbolicLink)
import System.Process (cwd, readCreateProcess, shell)
import System.Process (cwd, proc, readCreateProcess)
import Text.Interpolation.Nyan
import Text.Regex.TDFA.Common (CompOption (..), ExecOption (..), Regex)
import Text.Regex.TDFA.Text qualified as R
Expand Down Expand Up @@ -185,9 +185,9 @@ readDirectoryWith mode config scanner root = do
RdmBothTrackedAndUtracked -> liftA2 (<>) getTrackedFiles getUntrackedFiles

getTrackedFiles = readCreateProcess
(shell "git ls-files -z"){cwd = Just root} ""
(proc "git" ["ls-files", "-z"]){cwd = Just root} ""
getUntrackedFiles = readCreateProcess
(shell "git ls-files -z --others --exclude-standard"){cwd = Just root} ""
(proc "git" ["ls-files", "-z", "--others", "--exclude-standard"]){cwd = Just root} ""

fileLines :: String -> [String]
fileLines (dropWhile (== '\0') -> ls) =
Expand Down

0 comments on commit fd35008

Please sign in to comment.