@@ -25,7 +25,6 @@ type exportDirOptions struct {
2525 sourceDir string
2626 targetDir string
2727 overwrite bool
28- warnings []string
2928}
3029
3130// isFileSizeError checks if the error is due to file size limits.
@@ -101,7 +100,7 @@ func (opts *exportDirOptions) callback(ctx context.Context, workspaceFiler filer
101100
102101 // Skip non-exportable objects (e.g., MLFLOW_EXPERIMENT, LIBRARY)
103102 if isNonExportable (objectInfo .ObjectType ) {
104- opts . warnings = append ( opts . warnings , fmt .Sprintf ("%s (skipped; cannot export %s)" , sourcePath , objectInfo .ObjectType ))
103+ cmdio . LogString ( ctx , fmt .Sprintf ("%s (skipped; cannot export %s)" , sourcePath , objectInfo .ObjectType ))
105104 return nil
106105 }
107106
@@ -120,7 +119,7 @@ func (opts *exportDirOptions) callback(ctx context.Context, workspaceFiler filer
120119 if err != nil {
121120 // Check if this is a file size limit error
122121 if isFileSizeError (err ) {
123- opts . warnings = append ( opts . warnings , sourcePath + " (skipped; file too large)" )
122+ cmdio . LogString ( ctx , sourcePath + " (skipped; file too large)" )
124123 return nil
125124 }
126125 return err
@@ -166,7 +165,6 @@ func newExportDir() *cobra.Command {
166165 w := cmdctx .WorkspaceClient (ctx )
167166 opts .sourceDir = args [0 ]
168167 opts .targetDir = args [1 ]
169- opts .warnings = []string {}
170168
171169 // Initialize a filer and a file system on the source directory
172170 workspaceFiler , err := filer .NewWorkspaceFilesClient (w , opts .sourceDir )
@@ -185,16 +183,6 @@ func newExportDir() *cobra.Command {
185183 return err
186184 }
187185
188- // Print all warnings at the end if any were collected
189- if len (opts .warnings ) > 0 {
190- cmdio .LogString (ctx , "" )
191- cmdio .LogString (ctx , "Warnings:" )
192- for _ , warning := range opts .warnings {
193- cmdio .LogString (ctx , " - " + warning )
194- }
195- cmdio .LogString (ctx , "" )
196- }
197-
198186 return cmdio .RenderWithTemplate (ctx , newExportCompletedEvent (opts .targetDir ), "" , "Export complete\n " )
199187 }
200188
0 commit comments