install: use gitee nvm mirror

This commit is contained in:
undefined committed 2021-05-31 16:26:46 +08:00
1 parent 8a647dc36a
commit c683685e7e
1 file changed
+3 -1
+3 -1
View File
@@ -86,7 +86,9 @@ apt-get -qq update && apt-get -q install -y mongodb-org`, { retry: true }],
operations: [
() => {
const resp = http.request('GET', 'https://cdn.jsdelivr.net/gh/nvm-sh/nvm@v0.36.0/install.sh');
const script = resp.body.replace(/raw\.githubusercontent\.com\/nvm-sh\/nvm\//g, 'cdn.jsdelivr.net/gh/nvm-sh/nvm@');
const script = resp.body
.replace(/raw\.githubusercontent\.com\/nvm-sh\/nvm\//g, 'cdn.jsdelivr.net/gh/nvm-sh/nvm@')
.replace(/github\.com\/nvm-sh\/nvm\.git/g, 'gitee.com/imirror/nvm');
fs.writefile('/tmp/install-nvm.sh', script);
},
'bash /tmp/install-nvm.sh',