diff --git a/src/shared/services/commandInterpreterHelper.ts b/src/shared/services/commandInterpreterHelper.ts index 5a05ae379eb..326cdc93080 100644 --- a/src/shared/services/commandInterpreterHelper.ts +++ b/src/shared/services/commandInterpreterHelper.ts @@ -48,7 +48,8 @@ import { getRemoteContentHostnameAllowlist, getDatabases, fetchMetaData, - getAvailableSettings + getAvailableSettings, + SYSTEM_DB } from 'shared/modules/dbMeta/dbMetaDuck' import { canSendTxMetadata } from 'shared/modules/features/versionedFeatures' import { fetchRemoteGuide } from 'shared/modules/commands/helpers/play' @@ -354,13 +355,27 @@ const availableCommands = [ name: 'sysinfo', match: (cmd: any) => /^sysinfo$/.test(cmd), exec(action: any, put: any, store: any) { - put( - frames.add({ - useDb: getUseDb(store.getState()), - ...action, - type: 'sysinfo' - }) - ) + const useDb = getUseDb(store.getState()) + if (useDb === SYSTEM_DB) { + put( + frames.add({ + useDb, + ...action, + type: 'error', + error: UnsupportedError( + 'The :sysinfo command is not supported while using the system database.' + ) + }) + ) + } else { + put( + frames.add({ + useDb, + ...action, + type: 'sysinfo' + }) + ) + } } }, {