Skip to content

Conversation

rikkuness
Copy link
Contributor

Hopefully fixes #194

@gfwilliams
Copy link
Member

Looks good, but it looks like:

          ports.sort(function(a,b) {
            if (a.unimportant && !b.unimportant) return 1;
            if (b.unimportant && !a.unimportant) return -1;
            return 0;
          });

got removed, or did you handle it somewhere else I missed? I think the unimportant thing is so the CLI can automatically connect to the correct device (it's not considering ones that probably aren't right).

@rikkuness
Copy link
Contributor Author

good spot, I think I missed that, I'll fix now

@gfwilliams
Copy link
Member

Great, thanks! Just merging

@gfwilliams gfwilliams merged commit 2b601e0 into espruino:master May 8, 2025
1 check passed
@rikkuness rikkuness deleted the getPortsPromises branch May 9, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Espruino.Core.Serial.getPorts can callback too early
2 participants