feat: refactor system info retrieval and enhance logo output

- Replaced viper calls with utility functions in GetSystemInfo to improve code clarity and maintainability.
- Added a new system.go file with utility functions for retrieving system version and edition information.
- Enhanced PrintLogoWithWelcomeInfo to include detailed system information, improving user experience during server startup.
- Updated output formatting for better readability and consistency in welcome messages.
This commit is contained in:
Marvin Zhang
2024-12-29 19:01:23 +08:00
parent a8bf1156c4
commit 54800974eb
4 changed files with 47 additions and 11 deletions

View File

@@ -65,9 +65,8 @@ verify_python() {
return 1
fi
pip_version=$(pip -V)
if [[ ! $pip_version =~ "python ${version}" ]]; then
echo "ERROR: pip version does not match. expected: \"python ${version}\", but actual is \"${pip_version}\""
if ! command -v pip &> /dev/null; then
echo "ERROR: pip is not installed"
return 1
fi
return 0