Open calcaide opened 3 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
boundary-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 27, 2024 7:40pm |
boundary-ui-desktop | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 27, 2024 7:40pm |
Description
ICU-15109
Add check on the appUpdater to skip it if the Desktop client is NOT using the built in CLI.
IMPORTANT The first approach I tried was to use node fs.lstatSync. The issue I encounter is that the lstat object returned, in POSIX systems, the key
file
alwaysfalse
value. This happens because on POSIX system, the binary name we return isboundary
without file extension, therefore the lstat object mark it as directory, whatever we were passingboundary
orelectron-app/cli/boundary
.Decided to rely on parsing the path. If the parsed object returns values for the keys
dir
androot
, means it is indeed the CLI built in the desktop client.Happy to discuss other approaches.
How to Test
For Mac:
Use the built in CLI:
SETUP_CLI=true
and runyarn start:desktop
.Use system CLI:
SETUP_CLI=false
and runyarn start:desktop
.For Windows:
Notice in windows, we have the appUpdater disabled, so it will not be possible to test without code modifications.
Code modifications:
console.log(
isBuiltInCli:, boundaryCli.isBuiltInCli())
.Test procedure:
SETUP_CLI=true
and runyarn start:desktop
. Theconsole.log
should show TRUE.SETUP_CLI=false
and runyarn start:desktop
. Theconsole.log
should show FALSE.