2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 20:30:56 +00:00

[go-xcat] Fix GitHub issue #1998 (#2059)

* [go-xcat] Fix GitHub issue #1998, print out friendly error messages when no xcat paackages installed on updating

* [go-xcat] GitHub pull request #2059, change error message base on the comment of @whowutwut
This commit is contained in:
neo954
2016-11-03 02:39:07 -05:00
committed by yangsong
parent 7868ad6d3c
commit 472f94bb22

View File

@ -2,7 +2,7 @@
#
# go-xcat - Install xCAT automatically.
#
# Version 1.0.9
# Version 1.0.10
#
# Copyright (C) 2016 International Business Machines
# Eclipse Public License, Version 1.0 (EPL-1.0)
@ -1188,6 +1188,9 @@ function update_xcat()
[[ "${ver}" = "(not installed)" ]] &&
unset "install_list[${i}]"
done < <(check_package_version "${install_list[@]}")
[[ "${#install_list[@]}" -gt "0" ]]
warn_if_bad "$?" "xCAT is not installed."
exit_if_bad "$?" "In order to install xCAT, please rerun with \`${0##*/} install'."
install_packages "$@" "${install_list[@]}"
}