added support for Visual Studio Code (VSC) extension update (#628)
This commit is contained in:
@@ -112,6 +112,7 @@ pub enum Step {
|
||||
Vagrant,
|
||||
Vcpkg,
|
||||
Vim,
|
||||
VSCode,
|
||||
WindowsAppStore,
|
||||
Wsl,
|
||||
Yadm,
|
||||
|
||||
@@ -277,6 +277,7 @@ fn run() -> Result<()> {
|
||||
target_os = "netbsd",
|
||||
target_os = "dragonfly"
|
||||
)))]
|
||||
runner.execute(Step::VSCode, "vscode", || generic::run_vscode(run_type))?;
|
||||
runner.execute(Step::Atom, "apm", || generic::run_apm(run_type))?;
|
||||
runner.execute(Step::Rustup, "rustup", || generic::run_rustup(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Dotnet, ".NET", || generic::run_dotnet_upgrade(&ctx))?;
|
||||
|
||||
@@ -79,6 +79,23 @@ pub fn run_sheldon(ctx: &ExecutionContext) -> Result<()> {
|
||||
ctx.run_type().execute(&sheldon).args(&["lock", "--update"]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_vscode(run_type: RunType) -> Result<()> {
|
||||
let vscode = utils::require("code")?;
|
||||
|
||||
print_separator("Visual Studio Code");
|
||||
|
||||
let plugins = run_type.execute(&vscode).args(&["--list-extensions"]).check_output()?;
|
||||
|
||||
for plugin in plugins.lines() {
|
||||
run_type
|
||||
.execute(&vscode)
|
||||
.args(&["--force", "--install-extension", plugin])
|
||||
.check_run()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
target_os = "freebsd",
|
||||
target_os = "openbsd",
|
||||
|
||||
Reference in New Issue
Block a user