Re-add the Go step via go-global-update (#823)
* Re-add the Go step via go-global-update go-global-update (https://github.com/Gelio/go-global-update) is a small tool to update all executables installed in a user's GOBIN, effectively providing a `go get -u all` replacement for Go 1.16+. Since it appears that Go will not be receiving a built-in way to do this in the near future, this could be a good option in the meantime. * Skip silently if go-global-update is not present
This commit is contained in:
@@ -63,6 +63,19 @@ pub fn run_flutter_upgrade(run_type: RunType) -> Result<()> {
|
||||
run_type.execute(&flutter).arg("upgrade").check_run()
|
||||
}
|
||||
|
||||
pub fn run_go(run_type: RunType) -> Result<()> {
|
||||
let go = utils::require("go")?;
|
||||
let gopath = run_type.execute(&go).args(&["env", "GOPATH"]).check_output()?;
|
||||
|
||||
let go_global_update = utils::require("go-global-update")
|
||||
.unwrap_or_else(|_| PathBuf::from(gopath).join("bin/go-global-update"))
|
||||
.require()?;
|
||||
|
||||
print_separator("Go");
|
||||
|
||||
run_type.execute(&go_global_update).check_run()
|
||||
}
|
||||
|
||||
pub fn run_gem(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
let gem = utils::require("gem")?;
|
||||
base_dirs.home_dir().join(".gem").require()?;
|
||||
|
||||
Reference in New Issue
Block a user