Commit Graph

15 Commits

Author SHA1 Message Date
Connor Peet
ddb025c979 cli: fix install on windows arm64 not working
Fixes #164573
2022-11-07 09:05:04 -08:00
Joyce Er
fe5f564db1 Attempt to fix Rust clippy lint errors (#165377) 2022-11-03 11:19:58 -04:00
Connor Peet
c536595a7f cli: fallback to system installs in the standalone CLI
The standalone CLI should detect and fall back to using and
system-installed VS Code instance, rather than trying to download zips
and manage its own VS Code instances.

There are three approaches used for discovery:

- On Windows, we can easily and quickly read the register to find
  installed versions based on their app ID.
- On macOS, we initially look in `/Applications` and fall back to the
  slow `system_profiler` command to list app .app's if that fails.
- On Linux, we just look in the PATH. I believe all Linux installers
  (snap, dep, rpm) automatically add VS Code to the user's PATH.

Failing this, the user can also manually specify their installation dir,
using the command `code version use stable --install-dir /path/to/vscode`.

Fixes #164159
2022-10-20 10:54:13 -07:00
Connor Peet
ca1766cee4 rm debug code 2022-10-17 14:45:59 -07:00
Connor Peet
1b17ff429b fix clippy errors 2022-10-17 14:35:20 -07:00
Connor Peet
b987cb47f4 fix integrated cli check 2022-10-17 13:53:06 -07:00
Connor Peet
4e9bdbd44f make self-update work on Linux 2022-10-17 13:38:52 -07:00
Connor Peet
84439a87f6 wip 2022-10-14 15:46:49 -07:00
Connor Peet
84a929b8b7 Merge remote-tracking branch 'origin/main' into connor4312/cli-self-update 2022-10-14 14:23:41 -07:00
Connor Peet
8991187c38 cli: apply lint fixes 2022-10-12 22:39:57 -07:00
Connor Peet
889fbd2f1b add detection for integrated cli, verify 2022-09-26 07:22:58 +02:00
Connor Peet
07453efc00 cli: implement better self-updating
- Start separating a "standalone" CLI. This is a little awkward with clap-
  derive, but I got it working. Detection of whether the CLI _is_
  standalone is still todo.
- Remove the old ad-hoc update code for code-server, and use the update
  service instead.
- Fix some of the "permission denied" errors people got while updating
  before. We need to rename the old running binary, not just overwrite it.
2022-09-23 17:47:39 -07:00
Connor Peet
b784bcdd32 cli: use hard tabs to align with vscode style 2022-09-23 14:17:01 -07:00
Connor Peet
54ca489a5b cli: get update endpoint from build 2022-09-22 12:55:28 -07:00
Connor Peet
3762635fe1 move cli to top level 2022-09-20 08:42:44 -07:00