Fix python_version in show_env.sh when its meets python3. (#9894)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
This commit is contained in:
湛露先生
2025-09-05 09:57:39 +08:00
committed by GitHub
parent 3b1ee769eb
commit 9b724b3b5e

View File

@ -41,12 +41,7 @@ else
fi
# get python version
python_version=''
if command -v python &> /dev/null; then
python_version=$(python --version | cut -d ' ' -f2)
else
python_version="Python not installed"
fi
python_version=$(python3 --version 2>&1 || python --version 2>&1 || echo "Python not installed")
# Print all information
echo "Current Repository: $git_repo_name"