Skip to content

Commit df7596e

Browse files
committed
use WarnDeprecatedFiles to remove some code duplication
1 parent 8632870 commit df7596e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cli/upload/upload.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,8 @@ func runUploadCommand(command *cobra.Command, args []string) {
7979
}
8080
sketchPath := arguments.InitSketchPath(path)
8181

82-
// .pde files are still supported but deprecated, this warning urges the user to rename them
83-
if files := sketch.CheckForPdeFiles(sketchPath); len(files) > 0 && importDir == "" && importFile == "" {
84-
feedback.Error(tr("Sketches with .pde extension are deprecated, please rename the following files to .ino:"))
85-
for _, f := range files {
86-
feedback.Error(f)
87-
}
82+
if importDir == "" && importFile == "" {
83+
arguments.WarnDeprecatedFiles(sketchPath)
8884
}
8985

9086
sk, err := sketch.New(sketchPath)

0 commit comments

Comments
 (0)