-
Notifications
You must be signed in to change notification settings - Fork 529
Fix check authentication #327
Conversation
Hi @maxim-pop, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
…ation failed on 'code-push release' call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!!
sdk/script/management-sdk.ts
Outdated
|
||
public isAuthenticated(): Promise<boolean> { | ||
return Promise<boolean>((resolve, reject, notify) => { | ||
public isAuthenticatedWithMessage(): Promise<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the other methods in the SDK, could we change this to ensureAuthenticated()
, and return a void promise that resolves if authenticated, and rejects if not? Then the CLI doesn't need to construct an error object, and any external users of the SDK might also find this function useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
sdk/script/management-sdk.ts
Outdated
|
||
public isAuthenticated(): Promise<boolean> { | ||
return Promise<boolean>((resolve, reject, notify) => { | ||
public isAuthenticatedWithMessage(): Promise<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to just use this.get()
like the other methods here
…avior consistent.
Perform a separate call to server to check for authentication before making an upload release file call.