Skip to content

Commit 9cf9a17

Browse files
committed
Avoid extra temporary file
1 parent 8355f0c commit 9cf9a17

File tree

1 file changed

+1
-2
lines changed
  • cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates

1 file changed

+1
-2
lines changed

cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ main = cabalTest $ withProjectFile "cabal.project" $ withRemoteRepo "repo" $ do
1010
. resultOutput
1111
<$> recordMode DoNotRecord (cabal' "update" [])
1212
-- update golden output with actual timestamp
13-
shell "cp" ["cabal.out.in", "cabal.out"]
14-
shell "sed" ["-i''", "-e", "s/REPLACEME/" <> output <> "/g", "cabal.out"]
13+
shell "sed" ["-e", "s/REPLACEME/" <> output <> "/g; w cabal.out", "cabal.out.in"]
1514
-- This shall fail with an error message as specified in `cabal.out`
1615
fails $ cabal "build" ["--index-state=4000-01-01T00:00:00Z", "fake-pkg"]
1716
-- This shall fail by not finding the package, what indicates that it

0 commit comments

Comments
 (0)