File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ module Restyler.Config.CopyFiles
1616import Restyler.Prelude
1717
1818import Autodocodec hiding ((.=) )
19- import Data.List (nub )
2019import OptEnvConf hiding (env )
2120import Restyler.CodeVolume
2221import Restyler.Config.Glob
@@ -117,9 +116,4 @@ copyCodeFiles remoteFiles paths vol = do
117116
118117 dockerCpAll ps =
119118 -- tar -cf - ps | docker cp - container:/path
120- --
121- -- Ensure ps doesn't contain duplicates, otherwise you'll get an obscure
122- -- error from docker-cp, that it can't find /data.
123- --
124- -- https://github.com/restyled-io/actions/issues/391
125- dockerCpTar (nub ps) $ vol. container. unwrap <> " :" <> toFilePath vol. path. unwrap
119+ dockerCpTar ps $ vol. container. unwrap <> " :" <> toFilePath vol. path. unwrap
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ module Restyler.Monad.Docker
1818
1919import Restyler.Prelude
2020
21+ import Data.List (nub )
2122import Data.Text qualified as T
2223import Restyler.AnnotatedException
2324import System.Process.Typed
@@ -62,8 +63,13 @@ instance
6263 dockerCp src dst = runDocker_ [" cp" , " --quiet" , src, dst]
6364 dockerCpTar ps dst = do
6465 let
66+ -- Ensure ps doesn't contain duplicates, otherwise you'll get an obscure
67+ -- error from docker-cp, that it can't find /data.
68+ --
69+ -- https://github.com/restyled-io/actions/issues/391
70+ --
6571 tArgs :: [String ]
66- tArgs = [" -cf" , " -" ] <> map toFilePath ps
72+ tArgs = [" -cf" , " -" ] <> map toFilePath (nub ps)
6773
6874 dArgs :: [String ]
6975 dArgs = [" cp" , " --quiet" , " -" , dst]
You can’t perform that action at this time.
0 commit comments