Skip to content

Commit

Permalink
Don't expand @response-files after first '--'.
Browse files Browse the repository at this point in the history
Fixes #6050.
  • Loading branch information
23Skidoo committed May 17, 2019
1 parent 37e7ab1 commit 27ef964
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cabal-install/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ main' = do
-- when writing to stderr and stdout.
relaxEncodingErrors stdout
relaxEncodingErrors stderr
getArgs >>= expandResponse >>= mainWorker
(args0, args1) <- break (== "--") <$> getArgs
mainWorker =<< (++ args1) <$> expandResponse args0

mainWorker :: [String] -> IO ()
mainWorker args = do
Expand Down

2 comments on commit 27ef964

@phadej
Copy link
Collaborator

@phadej phadej commented on 27ef964 May 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does break tricky corner cases like

 % cabal v2-build --project-file -- -w ghc-8.4.4  fin

where -- is actually a file.

@phadej
Copy link
Collaborator

@phadej phadej commented on 27ef964 May 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, response files probably break

% cabal v2-build --project-file @projectfile -w ghc-8.4.4 fin

Like stuff too.


I'm ok not to fixing that, but these are limitation which should be documented.

Please sign in to comment.