Fix gvm use bug when using fuzzy match.

This commit is contained in:
Joshua Bussdieker
2012-02-28 18:59:08 -08:00
parent 169cc79622
commit 09f4d6688d
+1 -1
View File
@@ -9,7 +9,7 @@ function display_error() {
function gvm_use() {
[[ "$1" != "" ]] ||
display_error "Please specifiy the version" || return 1
fuzzy_match=`ls $GVM_ROOT/gos | grep "$1"` ||
fuzzy_match=`ls $GVM_ROOT/gos | grep "$1" | head -n 1` ||
display_error "Invalid version $1" || return 1
. $GVM_ROOT/environments/$fuzzy_match