@@ -1142,15 +1142,15 @@ func huggingFaceCmd(c *cli.Context) error {
11421142 cmdName , hfArgs := getCommandName (args )
11431143 switch cmdName {
11441144 case "u" , "upload" :
1145- return huggingFaceUploadCmd (c , hfArgs )
1145+ return huggingFaceUploadCmd (c , "upload" , hfArgs )
11461146 case "d" , "download" :
1147- return huggingFaceDownloadCmd (c , hfArgs )
1147+ return huggingFaceDownloadCmd (c , "download" , hfArgs )
11481148 default :
11491149 return errorutils .CheckErrorf ("unknown HuggingFace command: '%s'. Valid commands are: upload (u), download (d)" , cmdName )
11501150 }
11511151}
11521152
1153- func huggingFaceUploadCmd (c * cli.Context , hfArgs []string ) error {
1153+ func huggingFaceUploadCmd (c * cli.Context , cmdName string , hfArgs []string ) error {
11541154 // Upload requires folderPath and repoID
11551155 if len (hfArgs ) < 2 {
11561156 return cliutils .PrintHelpAndReturnError ("Folder path and repository ID are required." , c )
@@ -1184,6 +1184,7 @@ func huggingFaceUploadCmd(c *cli.Context, hfArgs []string) error {
11841184 repoType = "model"
11851185 }
11861186 huggingFaceUploadCmd := huggingfaceCommands .NewHuggingFaceUpload ().
1187+ SetCommandName (cmdName ).
11871188 SetFolderPath (folderPath ).
11881189 SetRepoId (repoID ).
11891190 SetRepoType (repoType ).
@@ -1193,7 +1194,7 @@ func huggingFaceUploadCmd(c *cli.Context, hfArgs []string) error {
11931194 return commands .Exec (huggingFaceUploadCmd )
11941195}
11951196
1196- func huggingFaceDownloadCmd (c * cli.Context , hfArgs []string ) error {
1197+ func huggingFaceDownloadCmd (c * cli.Context , cmdName string , hfArgs []string ) error {
11971198 // Download requires repoID
11981199 if len (hfArgs ) < 1 {
11991200 return cliutils .PrintHelpAndReturnError ("Model/Dataset name is required." , c )
@@ -1231,6 +1232,7 @@ func huggingFaceDownloadCmd(c *cli.Context, hfArgs []string) error {
12311232 revision = "main"
12321233 }
12331234 huggingFaceDownloadCmd := huggingfaceCommands .NewHuggingFaceDownload ().
1235+ SetCommandName (cmdName ).
12341236 SetRepoId (repoID ).
12351237 SetRepoType (repoType ).
12361238 SetRevision (revision ).
0 commit comments