Trim go paths (#940)

Fixes #937
This commit is contained in:
Roey Darwish Dror 2022-05-24 09:30:23 +03:00 committed by GitHub
parent 5a78d09300
commit c9161687d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,8 @@ pub fn run_flutter_upgrade(run_type: RunType) -> Result<()> {
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_output = run_type.execute(&go).args(&["env", "GOPATH"]).check_output()?;
let gopath = go_output.trim();
let go_global_update = utils::require("go-global-update")
.unwrap_or_else(|_| PathBuf::from(gopath).join("bin/go-global-update"))