Skip to content

Commit 9544922

Browse files
committed
优化 pip3 安装逻辑,增加对 --break-system-packages 选项的支持
1 parent 0621014 commit 9544922

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

f8x

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,12 +789,12 @@ Install_Switch4(){
789789
python3 -m pip install $1 --break-system-packages 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
790790
;;
791791
*)
792-
pip3 install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
792+
pip3 install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { pip3 install $1 --break-system-packages 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || Echo_ERROR "$1 module installation failed"; return 1; }
793793
;;
794794
esac
795795
;;
796796
*)
797-
pip3 install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
797+
pip3 install $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || { pip3 install $1 --break-system-packages 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3)" && return 0 || Echo_ERROR "$1 module installation failed"; return 1; }
798798
;;
799799
esac
800800

0 commit comments

Comments
 (0)