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

Commit 5fb9a1b

Browse files
committed
Fix bugs in CipherStash::Client.login
* A default profile would not be created correctly if a workspace was given but a profile was not passed to `Client.login`. Always providing a profile name fixes that. * If neither a workspace or profile name were given and a profile could not be loaded, an unhelpful auth error would be raised. Instead, explicitly raise that a profile could not be loaded (by always providing a profile name to `Profile#load`) so that downstream libs (ActiveStash) can handle this scenario properly.
1 parent 83bb5d0 commit 5fb9a1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/cipherstash/client/profile.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def self.create(name, logger, **opts)
128128

129129
def self.login(workspace:, profile_name:, logger:)
130130
is_initial_login = !workspace.nil?
131-
profile_name = resolve_profile_name(profile_name)
131+
profile_name = resolve_profile_name(profile_name) || "default"
132132

133133
if is_initial_login
134134
create(profile_name, logger, workspace: workspace)

0 commit comments

Comments
 (0)