diff --git a/src/commands/force/user/create.ts b/src/commands/force/user/create.ts index f85006de..c307f8e5 100644 --- a/src/commands/force/user/create.ts +++ b/src/commands/force/user/create.ts @@ -45,6 +45,9 @@ const permsetsStringToArray = (fieldsPermsets: string | string[]): string[] => { }; const standardizePasswordToBoolean = (input: unknown): boolean => { + if (typeof input === 'undefined') { + return false; + } if (typeof input === 'boolean') { return input; } @@ -52,7 +55,7 @@ const standardizePasswordToBoolean = (input: unknown): boolean => { if (input.toLowerCase() === 'true') { return true; } - if (input.toLowerCase() === 'false') { + if (input.toLowerCase() === 'false' || input === '') { return false; } }