From 30bc572c88d7010b11c9a8f1540ead025d7f14d7 Mon Sep 17 00:00:00 2001 From: M*C*O Date: Mon, 22 Feb 2021 09:40:20 +0100 Subject: [PATCH] Install VSCode extensions with a single command (#652) closes #647 --- src/steps/generic.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 34b18822..a13809d1 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -100,13 +100,15 @@ pub fn run_vscode(run_type: RunType) -> Result<()> { .args(&["--list-extensions"]) .check_output()?; + let mut args = vec!["--force"]; + for plugin in plugins.lines() { - run_type - .execute(&vscode) - .args(&["--force", "--install-extension", plugin]) - .check_run()?; + args.push("--install-extension"); + args.push(plugin); } + run_type.execute(&vscode).args(args).check_run()?; + Ok(()) }