Skip to content

Commit c7504c2

Browse files
committed
fixed copying of build output files
1 parent 0a6e99a commit c7504c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

commands/compile/compile.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,17 @@ func run(cmd *cobra.Command, args []string) {
276276

277277
// Copy .hex file to sketch folder
278278
srcHex := paths.New(outputPath)
279-
dstHex := sketchPath.Join(sketch.Name + "." + fqbn + ext)
279+
dstHex := paths.New(sketch.FullPath).Join(sketch.Name + "." + fqbn + ext)
280+
logrus.WithField("from", srcHex).WithField("to", dstHex).Print("copying sketch build output")
280281
if err = srcHex.CopyTo(dstHex); err != nil {
281282
formatter.PrintError(err, "Error copying output file.")
282283
os.Exit(commands.ErrGeneric)
283284
}
284285

285286
// Copy .elf file to sketch folder
286287
srcElf := paths.New(outputPath[:len(outputPath)-3] + "elf")
287-
dstElf := sketchPath.Join(sketch.Name + "." + fqbn + ".elf")
288+
dstElf := paths.New(sketch.FullPath).Join(sketch.Name + "." + fqbn + ".elf")
289+
logrus.WithField("from", srcElf).WithField("to", dstElf).Print("copying sketch build output")
288290
if err = srcElf.CopyTo(dstElf); err != nil {
289291
formatter.PrintError(err, "Error copying elf file.")
290292
os.Exit(commands.ErrGeneric)

0 commit comments

Comments
 (0)