Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 7e6c313

Browse files
committed
do not overwrite profile.name on saving for rasbperry accounts
1 parent bea1b8e commit 7e6c313

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

profiles.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@ module.exports = function (options) {
307307

308308
function cmd_save (args, done) {
309309
var profile = args.profile;
310-
profile.name = profile.firstName && profile.lastName ? profile.firstName + ' ' + profile.lastName : profile.name;
310+
if (!profile.raspberryId || !profile.name) {
311+
// if it's a raspberry pi connected account, keep profile.name if present
312+
profile.name = profile.firstName && profile.lastName ? profile.firstName + ' ' + profile.lastName : profile.name;
313+
}
311314
var profileKeys = _.keys(profile);
312315
var missingKeys = _.difference(requiredProfileFields, profileKeys);
313316
if (_.isEmpty(missingKeys)) profile.requiredFieldsComplete = true;

0 commit comments

Comments
 (0)