Skip to content

Commit

Permalink
fix: wrong user id on create
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Mar 22, 2021
1 parent 2eca54d commit 56faa19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/force/user/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class UserCreateCommand extends SfdxCommand {

// merge defaults with provided values with cli > file > defaults
const fields = await this.aggregateFields(defaultUserFields.getFields());

try {
this.authInfo = await this.user.createUser(UserCreateCommand.stripInvalidAPIFields(fields));
} catch (e) {
Expand Down Expand Up @@ -160,6 +161,7 @@ export class UserCreateCommand extends SfdxCommand {
await alias.write();
}

fields.id = this.authInfo.getFields().userId;
this.print(fields);

const { permsets, ...fieldsWithoutPermsets } = fields;
Expand Down

0 comments on commit 56faa19

Please sign in to comment.