mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
系统设置增加依赖代理和镜像设置
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
import { spawn } from 'cross-spawn';
|
||||
import SockService from './sock';
|
||||
import { FindOptions, Op } from 'sequelize';
|
||||
import { promiseExecSuccess } from '../config/util';
|
||||
import { fileExist, promiseExecSuccess } from '../config/util';
|
||||
import dayjs from 'dayjs';
|
||||
import taskLimit from '../shared/pLimit';
|
||||
|
||||
@@ -252,10 +252,18 @@ export default class DependenceService {
|
||||
return resolve(null);
|
||||
}
|
||||
}
|
||||
|
||||
const cp = spawn(`${depRunCommand} ${dependency.name.trim()}`, {
|
||||
shell: '/bin/bash',
|
||||
});
|
||||
const dependenceProxyFileExist = await fileExist(
|
||||
config.dependenceProxyFile,
|
||||
);
|
||||
const proxyStr = dependenceProxyFileExist
|
||||
? `pnpm config get registry && source ${config.dependenceProxyFile} &&`
|
||||
: '';
|
||||
const cp = spawn(
|
||||
`${proxyStr} ${depRunCommand} ${dependency.name.trim()}`,
|
||||
{
|
||||
shell: '/bin/bash',
|
||||
},
|
||||
);
|
||||
|
||||
cp.stdout.on('data', async (data) => {
|
||||
this.sockService.sendMessage({
|
||||
|
||||
Reference in New Issue
Block a user