Skip to content

Commit

Permalink
haste-boot: fix argument passing for haste-cabal wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
valderman committed Jan 10, 2017
1 parent 1f6d6a6 commit 71a8353
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/haste-boot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,22 @@ hasteCabalLauncher True = unlines
, "HASTEC=\"$(dirname $0)/hastec\""
, "DIR=\"$($HASTEC --print-libdir)/../haste-cabal\""
, "export LD_LIBRARY_PATH=$DIR"
, "exec $DIR/haste-cabal.bin $@" ]
, "args=\"\""
, "for arg in \"$@\" ; do"
, " args=\"$args \\\"$arg\\\"\""
, "done"
, "echo $args | xargs $DIR/haste-cabal.bin"
]
hasteCabalLauncher False = unlines
[ "#!/bin/bash"
, "DIR=\"" ++ hasteCabalRootDir False </> "haste-cabal" ++ "\""
, "export LD_LIBRARY_PATH=$DIR"
, "exec $DIR/haste-cabal.bin $@" ]
, "args=\"\""
, "for arg in \"$@\" ; do"
, " args=\"$args \\\"$arg\\\"\""
, "done"
, "echo $args | xargs $DIR/haste-cabal.bin"
]

-- | Fetch the Haste base libs.
fetchLibs :: FilePath -> Shell ()
Expand Down

0 comments on commit 71a8353

Please sign in to comment.