Skip to content

Switch from open package to using vscode.open command. #65

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require("esbuild")
entryPoints: ["./src/extension.ts"],
bundle: true,
outdir: "./out",
external: ["vscode", "open"],
external: ["vscode"],
format: "cjs",
sourcemap: !production,
minify: production,
Expand Down
58 changes: 0 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
},
"dependencies": {
"clipboardy": "^2.3.0",
"open": "^8.4.2",
"ramda": "^0.25.0"
}
}
7 changes: 5 additions & 2 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { window, workspace, QuickPickItem } from "vscode";

const exec = require("child_process").exec;
const path = require("path");
const open = require("open");
const R = require("ramda");
const clipboardy = require("clipboardy");
import * as vscode from "vscode";

export const BRANCH_URL_SEP = " — ";

Expand Down Expand Up @@ -537,7 +537,10 @@ export function showQuickPickWindow(quickPickList: QuickPickItem[]) {
*/
export async function openQuickPickItem(item?: QuickPickItem) {
if (!item) return;
return await open((item as any).url);
return await vscode.commands.executeCommand(
"vscode.open",
vscode.Uri.parse((item as any).url)
);
}

/**
Expand Down