opendylan icon indicating copy to clipboard operation
opendylan copied to clipboard

Make run-application API consistent on Windows

Open cgay opened this issue 2 years ago • 1 comments

In b190938ddf200c926067bc676d2fdaef71542586 I changed run-application on unix system to not require a limited collection of strings because it makes the API more difficult to use. Do the same for Windows.

cgay avatar Jun 19 '23 20:06 cgay

It looks like run-application on Windows doesn't work with a sequence of strings at all, which makes sense since neither does the win32 CreateProcessA API as far as I can see.

Assuming my reading of the above is correct, we have choices:

  1. Change run-application on Windows to accept <sequence> and raise a friendly error if a non-<string> argument contain any non-<string> elements. Convert the sequence to a string with join(seq, " "). (Let's assume we'll ignore issues of ensuring command arguments are quoted.)
  2. Change run-application on Windows to accept <string> only and document that in order to be cross-platform users should pass a string to run-application.

cgay avatar Jun 20 '23 00:06 cgay