From 26846cd8471b9abae3dfb668f69ced45704c442e Mon Sep 17 00:00:00 2001 From: Frux Date: Tue, 2 Apr 2019 23:09:00 +0500 Subject: [PATCH] fix handling ssh link with empty user (#3521) --- lib/actions/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/actions/ui.js b/lib/actions/ui.js index 54f22b11..259192ab 100644 --- a/lib/actions/ui.js +++ b/lib/actions/ui.js @@ -287,7 +287,7 @@ export function openSSH(url) { type: UI_OPEN_SSH_URL, effect() { let parsedUrl = parseUrl(url, true); - let command = parsedUrl.protocol + ' ' + (parsedUrl.user || '') + '@' + parsedUrl.resource; + let command = parsedUrl.protocol + ' ' + (parsedUrl.user ? `${parsedUrl.user}@` : '') + parsedUrl.resource; if (parsedUrl.port) command += ' -p ' + parsedUrl.port;