[📦 NEW] go get -u all (#262)
This commit is contained in:
committed by
Roey Darwish Dror
parent
4b495629c8
commit
e5f7c74c84
@@ -34,6 +34,7 @@ pub enum Step {
|
||||
Rustup,
|
||||
Cargo,
|
||||
Flutter,
|
||||
Go,
|
||||
Shell,
|
||||
Opam,
|
||||
Vcpkg,
|
||||
|
||||
@@ -355,6 +355,15 @@ fn run() -> Result<(), Error> {
|
||||
)?;
|
||||
}
|
||||
|
||||
if config.should_run(Step::Go) {
|
||||
execute(
|
||||
&mut report,
|
||||
"Go",
|
||||
|| generic::run_go(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
}
|
||||
|
||||
if config.should_run(Step::Emacs) {
|
||||
execute(&mut report, "Emacs", || emacs.upgrade(run_type), config.no_retry())?;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ use crate::terminal::{print_separator, shell};
|
||||
use crate::utils::{self, PathExt};
|
||||
use directories::BaseDirs;
|
||||
use failure::ResultExt;
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
@@ -20,11 +21,21 @@ pub fn run_cargo_update(run_type: RunType) -> Result<(), Error> {
|
||||
|
||||
pub fn run_flutter_upgrade(run_type: RunType) -> Result<(), Error> {
|
||||
let flutter = utils::require("flutter")?;
|
||||
print_separator("Flutter");
|
||||
|
||||
print_separator("Flutter");
|
||||
run_type.execute(&flutter).arg("upgrade").check_run()
|
||||
}
|
||||
|
||||
pub fn run_go(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||
let go = utils::require("go")?;
|
||||
env::var("GOPATH")
|
||||
.unwrap_or_else(|_| base_dirs.home_dir().join("go").to_str().unwrap().to_string())
|
||||
.require()?;
|
||||
|
||||
print_separator("Go");
|
||||
run_type.execute(&go).arg("get").arg("-u").arg("all").check_run()
|
||||
}
|
||||
|
||||
pub fn run_gem(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||
let gem = utils::require("gem")?;
|
||||
base_dirs.home_dir().join(".gem").require()?;
|
||||
|
||||
Reference in New Issue
Block a user