fix: handle package version panic (#57)

This commit is contained in:
Matan Kushner
2019-05-16 10:06:34 -06:00
committed by GitHub
parent 2cf69a82b7
commit 876e7d36b1
2 changed files with 62 additions and 28 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
use ansi_term::Color;
use std::path::PathBuf;
use std::process::Command;
use super::{Context, Module};
@@ -53,7 +52,7 @@ fn get_go_version() -> Option<String> {
}
fn format_go_version(go_stdout: String) -> Option<String> {
let mut version = go_stdout
let version = go_stdout
// split into ["", "1.12.4 linux/amd64"]
.splitn(2, "go version go")
// return "1.12.4 linux/amd64"