Skip to content

Commit aa814a8

Browse files
compile: fix export artifact when contins folder
1 parent 84fc413 commit aa814a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: commands/service_compile.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,12 @@ func (s *arduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu
407407
for _, buildFile := range buildFiles {
408408
exportedFile := exportPath.Join(buildFile.Base())
409409
logrus.WithField("src", buildFile).WithField("dest", exportedFile).Trace("Copying artifact.")
410-
if err = buildFile.CopyTo(exportedFile); err != nil {
411-
return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Error copying output file %s", buildFile), Cause: err}
410+
if buildFile.IsDir() {
411+
continue
412+
} else {
413+
if err = buildFile.CopyTo(exportedFile); err != nil {
414+
return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Error copying output file %s", buildFile), Cause: err}
415+
}
412416
}
413417
}
414418
}

0 commit comments

Comments
 (0)