fix(plugin-system-settings): cannot read property cliArgs of undefined

This commit is contained in:
chenos 2022-04-25 16:13:35 +08:00
parent 327e413b6d
commit b0d3274b2d

View File

@ -4,11 +4,11 @@ import { resolve } from 'path';
export class SystemSettingsPlugin extends Plugin {
async install(options: InstallOptions) {
const [opts] = options.cliArgs;
const { cliArgs } = options;
await this.db.getRepository('systemSettings').create({
values: {
title: 'NocoBase',
appLang: opts?.lang || 'en-US',
appLang: cliArgs?.[0]?.opts?.lang || process.env.APP_LANG || 'en-US',
logo: {
title: 'nocobase-logo',
filename: '682e5ad037dd02a0fe4800a3e91c283b.png',