Skip to content

Commit

Permalink
Support string argument in vscode.open (#12997)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Oct 26, 2023
1 parent daab3bb commit 39935ec
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ export class PluginVscodeCommandsContribution implements CommandContribution {
registerCommands(commands: CommandRegistry): void {
commands.registerCommand(VscodeCommands.OPEN, {
isVisible: () => false,
execute: async (resource: URI, columnOrOptions?: ViewColumn | TextDocumentShowOptions) => {
execute: async (resource: URI | string, columnOrOptions?: ViewColumn | TextDocumentShowOptions) => {
if (typeof resource === 'string') {
resource = URI.parse(resource);
}
try {
await this.openWith(VscodeCommands.OPEN.id, resource, columnOrOptions);
} catch (error) {
Expand Down

0 comments on commit 39935ec

Please sign in to comment.