mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
修复 npm 源判断
This commit is contained in:
1 parent
0c28b63ab7
commit
e1863407f2
1 file changed
+2
-1
@@ -20,7 +20,8 @@ if [[ $PipMirror ]]; then
|
||||
pip3 config set global.index-url $PipMirror
|
||||
fi
|
||||
current_npm_registry=$(cd && pnpm config get registry)
|
||||
if [[ $current_npm_registry != $NpmMirror ]]; then
|
||||
is_equal_registry=$(echo $current_npm_registry | grep "${NpmMirror}")
|
||||
if [[ "$is_equal_registry" == "" ]]; then
|
||||
cd && pnpm config set registry $NpmMirror
|
||||
pnpm install -g --force
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user