File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import (
2121
2222func newPullCommand () * cobra.Command {
2323 cmd := & cobra.Command {
24- Use : "pull [IMAGE]" ,
24+ Use : "pull [IMAGE] [FOLDER] " ,
2525
2626 Short : "Pull the contents of a model into your local directory." ,
2727 Example : `cog pull r8.im/your-username/hotdog-detector` ,
@@ -141,7 +141,11 @@ func pull(cmd *cobra.Command, args []string) error {
141141 image := args [0 ]
142142
143143 // Create the working folder
144- projectDir = imageToDir (image , projectDir )
144+ if len (args ) == 1 {
145+ projectDir = imageToDir (image , projectDir )
146+ } else {
147+ projectDir = filepath .Join (projectDir , args [1 ])
148+ }
145149 err = os .MkdirAll (projectDir , 0o755 )
146150 if err != nil {
147151 logClient .EndPull (ctx , err , logCtx )
You can’t perform that action at this time.
0 commit comments