Fix running presence server with default user

This commit is contained in:
Samuel Elliott 2022-11-16 11:07:33 +00:00
parent c90a36d8d5
commit 7f4b190465
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -46,8 +46,8 @@ export function builder(yargs: Argv<ParentArguments>) {
default: ['[::]:0'],
}).option('user', {
describe: 'Nintendo Account ID',
type: 'array',
default: null,
type: 'string',
array: true,
}).option('splatnet3', {
describe: 'Enable SplatNet 3 presence',
type: 'boolean',
@ -77,6 +77,8 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
const user_naid: string | undefined = !argv.user ? await storage.getItem('SelectedUser') : undefined;
const user_naids = argv.user ?? (user_naid ? [user_naid] : []);
debug('user', user_naids);
if (!user_naids.length) {
throw new Error('No user selected');
}