From 7a43a454dd6dc6d1906f9209812bbf4e203d46be Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Mon, 6 May 2024 20:21:06 +0800 Subject: [PATCH 1/3] feat: support VSCodium in the step VSCode --- src/steps/generic.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 2db01bae..b6ba3a4c 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -354,7 +354,9 @@ pub fn run_vscode_extensions_update(ctx: &ExecutionContext) -> Result<()> { return Err(SkipStep(String::from("Should not run in WSL")).into()); } - let vscode = require("code")?; + let vscode = require("code").or_else( + |_| require("codium") + )?; // Vscode has update command only since 1.86 version ("january 2024" update), disable the update for prior versions // Use command `code --version` which returns 3 lines: version, git commit, instruction set. We parse only the first one From 0e31cf706f467d4cfc0c4f97dd22a61d72f0613b Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Mon, 6 May 2024 20:22:32 +0800 Subject: [PATCH 2/3] style: fmt --- src/steps/generic.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/steps/generic.rs b/src/steps/generic.rs index b6ba3a4c..01f53b0f 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -354,9 +354,7 @@ pub fn run_vscode_extensions_update(ctx: &ExecutionContext) -> Result<()> { return Err(SkipStep(String::from("Should not run in WSL")).into()); } - let vscode = require("code").or_else( - |_| require("codium") - )?; + let vscode = require("code").or_else(|_| require("codium"))?; // Vscode has update command only since 1.86 version ("january 2024" update), disable the update for prior versions // Use command `code --version` which returns 3 lines: version, git commit, instruction set. We parse only the first one From a0d1ba2657c678fa1312932266aac48f23059679 Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Mon, 6 May 2024 20:59:00 +0800 Subject: [PATCH 3/3] feat: alias support in configuration file --- src/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.rs b/src/config.rs index 447c6d49..67295c23 100644 --- a/src/config.rs +++ b/src/config.rs @@ -151,6 +151,7 @@ pub enum Step { Vagrant, Vcpkg, Vim, + #[serde(alias="vscodium")] Vscode, Waydroid, Winget,