mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-12 02:58:32 -05:00
Reworks commanding structure for less redundancy
Adds command args copying when needed
This commit is contained in:
@@ -23,9 +23,10 @@ export class OpenInRemoteCommand extends ActiveEditorCommand {
|
||||
async execute(editor: TextEditor, uri?: Uri, args: OpenInRemoteCommandArgs = {}) {
|
||||
uri = getCommandUri(uri, editor);
|
||||
|
||||
try {
|
||||
if (args.remotes === undefined || args.resource === undefined) return undefined;
|
||||
args = { ...args };
|
||||
if (args.remotes === undefined || args.resource === undefined) return undefined;
|
||||
|
||||
try {
|
||||
if (args.remotes.length === 1) {
|
||||
const command = new OpenRemoteCommandQuickPickItem(args.remotes[0], args.resource);
|
||||
return command.execute();
|
||||
|
||||
Reference in New Issue
Block a user