小调整

pull/391/head
王良 2024-11-15 16:35:49 +08:00
parent 5ee2709d65
commit ed3f491c98
3 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ on:
branches: branches:
- master - master
- release - release
- '1.x'
pull_request: pull_request:
branches: branches:
- master - master

View File

@ -11,7 +11,7 @@ module.exports = {
'cafile': false, 'cafile': false,
'NODE_EXTRA_CA_CERTS': false, 'NODE_EXTRA_CA_CERTS': false,
'NODE_TLS_REJECT_UNAUTHORIZED': false, 'NODE_TLS_REJECT_UNAUTHORIZED': false,
'yarnRegistry': 'null', 'yarnRegistry': 'default',
'registry': 'https://registry.npmjs.org', // 可以选择切换官方或者淘宝镜像 'registry': 'https://registry.npmjs.org', // 可以选择切换官方或者淘宝镜像
}, },
// intercepts: { // intercepts: {

View File

@ -45,7 +45,7 @@ const NodePlugin = function (context) {
const cmds = [] const cmds = []
for (const item of list) { for (const item of list) {
if (item.value != null && item.value.length > 0 && item.value !== 'default') { if (item.value != null && item.value.length > 0 && item.value !== 'default' && item.value !== 'null') {
cmds.push(`${command} config set ${item.key} ${item.value}`) cmds.push(`${command} config set ${item.key} ${item.value}`)
} else { } else {
cmds.push(`${command} config delete ${item.key}`) cmds.push(`${command} config delete ${item.key}`)
@ -68,7 +68,7 @@ const NodePlugin = function (context) {
const cmds = [] const cmds = []
log.debug('yarn set:', JSON.stringify(list)) log.debug('yarn set:', JSON.stringify(list))
for (const item of list) { for (const item of list) {
if (item.value != null && item.value.length > 0 && item.value !== 'default') { if (item.value != null && item.value.length > 0 && item.value !== 'default' && item.value !== 'null') {
cmds.push(`yarn config set ${item.key} ${item.value}`) cmds.push(`yarn config set ${item.key} ${item.value}`)
} else { } else {
cmds.push(`yarn config delete ${item.key}`) cmds.push(`yarn config delete ${item.key}`)