-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uri handler multiple windows #152
Conversation
Testing this locally (with the PAKUI changes locally) it still just seems to open the most recent window, not the originating window. Am I missing a step? |
It should still show the confirmation modal in the most recent/active window, but when the EDIT: I think the issue may be that you need to have these changes installed in the other window also. |
src/lib/commands/auth.ts
Outdated
context.subscriptions.push( | ||
commands.registerCommand(COMMANDS.AUTHORIZE_ACCOUNT, async () => { | ||
const authUrl = | ||
'https://app.hubspot.com/l/personal-access-key/auth/vscode'; | ||
const authUrl = `https://app.hubspot.com/l/personal-access-key/auth/vscode${rootPath}`; |
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.
I can't fully test the flow on Windows but since rootPath
uses fsPath
, this path contains the windows style path which looks like .../auth/vscodec:\folder
which causes a 404
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.
Switched to using path
instead of fsPath
and also added a fix for the value of rootPath
that is returned from personal-access-key-ui, which is something like /C:/Folder
. The fix slices off the leading /
.
Let me know if you see any issues with this.
…containing paths in windows
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.
Can't fully test the Windows stuff yet but LGTM otherwise
Fixes #151
Related Info
https://code.visualstudio.com/api/references/vscode-api#window.registerUriHandler