Fix logic in SendToMarsEditCommand where it finds the app to talk to. A running app takes precedence.

This commit is contained in:
Brent Simmons 2018-01-14 11:12:28 -08:00
parent 39d6086e0c
commit f9c5c5ad60

View File

@ -39,11 +39,15 @@ private extension SendToMarsEditCommand {
func appToUse() -> UserApp? {
marsEditApps.forEach{ $0.updateStatus() }
for app in marsEditApps {
app.updateStatus()
if app.isRunning {
return app
}
}
for app in marsEditApps {
if app.existsOnDisk {
return app
}