From 41503af39b3da7e3112dd231769fa449227e26e8 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 27 Apr 2021 10:23:19 +0100 Subject: [PATCH] Remove stale builds If no executable was specified, but one was in place, assume it is stale and remove --- cmd/fyne/commands/package.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/fyne/commands/package.go b/cmd/fyne/commands/package.go index eb09ced601..e00fa5bec2 100644 --- a/cmd/fyne/commands/package.go +++ b/cmd/fyne/commands/package.go @@ -157,6 +157,10 @@ func (p *packager) validate() error { if p.exe == "" { p.exe = filepath.Join(p.srcDir, exeName) + + if util.Exists(p.exe) { // the exe was not specified, assume stale + p.removeBuild() + } } else if p.os == "ios" || p.os == "android" { _, _ = fmt.Fprint(os.Stderr, "Parameter -executable is ignored for mobile builds.\n") }