If we are a secondary instance, do not attempt to delete any log files;
instead, continue writing to the existing logs. As we will quit shortly,
the logs in the current process are not interesting.
Signed-off-by: Mark Yen <mark.yen@suse.com>
Using a different version requires rebuilding the application anyway; so
instead of downloading it at runtime, just package it in the application.
Signed-off-by: Mark Yen <mark.yen@suse.com>
- Also prefer `fs.rename` to `fs.copyFile ; fs.unlink` but fall back
to the latter when the former fails.
Signed-off-by: Eric Promislow <epromislow@suse.com>
- Known problem: can't fs.rename across windows drives,
because it uses a hard link to create the new file,
and that isn't supported.
- Could have checked for a[1] === b[1] === ':' and a[0].toUpperCase() !== b[0].toUpperCase()
but I'm doing this with an explicit copy and unlink to avoid other problems, like moving
over two mounted systems on macos.
Signed-off-by: Eric Promislow <epromislow@suse.com>
If the user had already installed WSL, but _not_ the kernel update, we
should not force a reboot; instead, we should prompt the user first.
Also remove logging that wasn't meant to be checked in.
Signed-off-by: Mark Yen <mark.yen@suse.com>
This is necessary as child_process.spawn() will error out badly when the
writable stream doesn't have a fd open yet.
Signed-off-by: Mark Yen <mark.yen@suse.com>
We repeatedly write code to handle spawning children that log to a file and
return a promise. This attempts to factor that out.
Note that on Windows we may need to to string encoding conversion before
writing the output, as some tools may emit UTF-16 instead. This has built-
in support for that.
Signed-off-by: Mark Yen <mark.yen@suse.com>
ESLint doesn't recognize TypeScript built-ins. This is fine, as the
TypeScript compiler will error out on undefined variables.
Signed-off-by: Mark Yen <mark.yen@suse.com>
Electron-builder has default entries in Info.plist for why it might want
camera and microphone usage (required on macOS 10.15+ for media access).
As we are unlikely to ever want media access, remove those entries instead
so that people are not confused about us possibly wanting unnecessary
permissions.
Signed-off-by: Mark Yen <mark.yen@suse.com>
This makes it possible to handle MITM-style corporate proxies, where custom
certificate authorities are added to the system certificate store.
Signed-off-by: Mark Yen <mark.yen@suse.com>
Needed for interoperability with TypeScript. Note that these are rather
incomplete; they're enough for our uses, but in particular for win-ca the
API exposes a rather complicated surface for retrofitting types.
Signed-off-by: Mark Yen <mark.yen@suse.com>
These will help in using system certificate stores, mainly for machines on
corporate networks with MITM proxies.
Signed-off-by: Mark Yen <mark.yen@suse.com>
1. No need to mention `undefined.clusters` in the dialog box,
as it's in the code already.
2. All other problems should be reported in a general dialog box.
Otherwise, the app will quietly fail to start.
Signed-off-by: Eric Promislow <epromislow@suse.com>
* `refreshImages` no longer needs an `emitChanges` arg
* prefer `array.some` to `array.find` to determine existence only
Signed-off-by: Eric Promislow <epromislow@suse.com>