File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,9 @@ commandLineHandler currentDir progName isInterpreter = complicatedOptions
305305 addCommand' " unpack"
306306 " Unpack one or more packages locally"
307307 unpackCmd
308- (some $ strArgument $ metavar " PACKAGE" )
308+ ((,) <$> (some $ strArgument $ metavar " PACKAGE" )
309+ <*> (optional $ textOption $ long " to" <>
310+ help " Optional path to unpack the package into" ))
309311 addCommand' " update"
310312 " Update the package index"
311313 updateCmd
@@ -647,10 +649,11 @@ uninstallCmd _ go = withConfigAndLock go $
647649 ]
648650
649651-- | Unpack packages to the filesystem
650- unpackCmd :: [String ] -> GlobalOpts -> IO ()
651- unpackCmd names go = withConfigAndLock go $ do
652+ unpackCmd :: ([String ], Maybe Text ) -> GlobalOpts -> IO ()
653+ unpackCmd (names, Nothing ) go = unpackCmd (names, Just " ." ) go
654+ unpackCmd (names, Just dstPath) go = withConfigAndLock go $ do
652655 mSnapshotDef <- mapM (makeConcreteResolver Nothing >=> loadResolver) (globalResolver go)
653- Stack.Fetch. unpackPackages mSnapshotDef " . " names
656+ Stack.Fetch. unpackPackages mSnapshotDef ( T. unpack dstPath) names
654657
655658-- | Update the package index
656659updateCmd :: () -> GlobalOpts -> IO ()
You can’t perform that action at this time.
0 commit comments