Skip to content

Commit 6d79813

Browse files
Uses default remote for deep links when configured
1 parent 6249eb7 commit 6d79813

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/commands/copyDeepLink.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ export class CopyDeepLinkCommand extends ActiveEditorCommand {
106106
try {
107107
let chosenRemote;
108108
const remotes = await this.container.git.getRemotes(repoPath, { sort: true });
109+
const defaultRemote = remotes.find(r => r.default);
109110
if (args.remote && !args.prePickRemote) {
110111
chosenRemote = remotes.find(r => r.name === args?.remote);
112+
} else if (defaultRemote != null) {
113+
chosenRemote = defaultRemote;
111114
} else {
112115
const pick = await showRemotePicker(
113116
`Copy Link to ${deepLinkTypeToString(type)}`,

0 commit comments

Comments
 (0)