mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
cli: add acquire_cli (#179837)
* cli: add acquire_cli
As given in my draft document, pipes a CLI of the given platform to the
specified process, for example:
```js
const cmd = await rpc.call('acquire_cli', {
command: 'node',
args: [
'-e',
'process.stdin.pipe(fs.createWriteStream("c:/users/conno/downloads/hello-cli"))',
],
platform: Platform.LinuxX64,
quality: 'insider',
});
```
It genericizes caching so that the CLI is also cached on the host, just
like servers.
* fix bug
This commit is contained in:
@@ -65,8 +65,8 @@ impl<'a> SelfUpdate<'a> {
|
||||
) -> Result<(), AnyError> {
|
||||
// 1. Download the archive into a temporary directory
|
||||
let tempdir = tempdir().map_err(|e| wrap(e, "Failed to create temp dir"))?;
|
||||
let archive_path = tempdir.path().join("archive");
|
||||
let stream = self.update_service.get_download_stream(release).await?;
|
||||
let archive_path = tempdir.path().join(stream.url_path_basename().unwrap());
|
||||
http::download_into_file(&archive_path, progress, stream).await?;
|
||||
|
||||
// 2. Unzip the archive and get the binary
|
||||
|
||||
Reference in New Issue
Block a user