Skip to content
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

Use 'vscode.open' instead of the 'open' #406

Closed
jdneo opened this issue Feb 9, 2019 · 11 comments · Fixed by #1401
Closed

Use 'vscode.open' instead of the 'open' #406

jdneo opened this issue Feb 9, 2019 · 11 comments · Fixed by #1401

Comments

@jdneo
Copy link
Member

jdneo commented Feb 9, 2019

Just a small suggestion, but using 'opn' is fine also...

For now, when we want to open a URL in the browser, we leverage the 'opn' module.

Actually, this module can be replaced with the VS Code embedded command, for example:

export async function openUrl(url: string): Promise<void> {
    await vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(url));
}
@jdneo
Copy link
Member Author

jdneo commented Feb 9, 2019

@EricJizbaMSFT

@StephenWeatherford
Copy link
Contributor

Huh...

@jdneo
Copy link
Member Author

jdneo commented Jun 13, 2019

Guess this could be closed...

@jdneo jdneo closed this as completed Jun 13, 2019
@bwateratmsft
Copy link
Contributor

I'm going to reopen this; the use of open does not permit opening of URLs from in-browser Codespaces. See microsoft/vscode-docker#2944 and microsoft/vscode-docker#2943.

@bwateratmsft bwateratmsft reopened this Aug 4, 2021
@bwateratmsft bwateratmsft changed the title Use 'vscode.open' instead of the 'opn' Use 'vscode.open' instead of the 'open' Aug 4, 2021
@bwateratmsft
Copy link
Contributor

Modified the title slightly since we now use open instead of opn.

@bwateratmsft
Copy link
Contributor

Related also to #867

@bwateratmsft
Copy link
Contributor

Maybe blocked by microsoft/vscode#85930 but probably need @ejizba to take a look.

@bwateratmsft
Copy link
Contributor

I think that using vscode.env.openExternal may also get used as part of port forwarding with remote sessions.

@ejizba
Copy link
Contributor

ejizba commented Aug 6, 2021

I don't think we'll fully switch to openExternal until that bug is fixed, but we could maybe special-case codespace scenarios

@bwateratmsft
Copy link
Contributor

Is it frequent that we run into the URL parsing issues? If not, would it be practical to special case those and let the general case be vscode.env.openExternal?

@bwateratmsft
Copy link
Contributor

This is fixed now by #1401

@bwateratmsft bwateratmsft linked a pull request Apr 19, 2023 that will close this issue
@azuretools-vscode-bot azuretools-vscode-bot bot locked and limited conversation to collaborators Jan 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants