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:
parent
3b1ee769eb
commit
9b724b3b5e
1 changed files with 1 additions and 6 deletions
|
|
@ -41,12 +41,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get python version
|
# get python version
|
||||||
python_version=''
|
python_version=$(python3 --version 2>&1 || python --version 2>&1 || echo "Python not installed")
|
||||||
if command -v python &> /dev/null; then
|
|
||||||
python_version=$(python --version | cut -d ' ' -f2)
|
|
||||||
else
|
|
||||||
python_version="Python not installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Print all information
|
# Print all information
|
||||||
echo "Current Repository: $git_repo_name"
|
echo "Current Repository: $git_repo_name"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue