'add seafile-ignore.txt to every git repo'

This commit is contained in:
Luk Lu
2023-01-12 20:09:49 +08:00
parent 3a26fb9353
commit 65594f0a5e
2 changed files with 60 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ module.exports = {
'./envar-base-secret.js',
'./envar-base-secret.gitignore.js',
],
withCmd = false,
} = {}) {
if (!global.envar) {
global.envar = rawEnvar // 不知为何必须定义成全局变量才能保证多次require只执行一次。
@@ -51,7 +52,7 @@ module.exports = {
console.warn(` - unrecognized envarFiles!`)
}
try {
if (withCmd) {
const commander = require('commander')
if (Array.isArray(global.envar.commanderOptions)) {
console.info('- Loading Command Line Parameters (载入命令行参数)')
@@ -70,8 +71,6 @@ module.exports = {
}
}
}
} catch (e) {
console.error(' - commander not available!')
}
console.log(`>>>>>>>> Configured [${process.env.NODE_ENV}] Environment >>>>>>>>`)