Skip to content

Commit 8453359

Browse files
authored
fix: support encoded url in remote (#938)
1 parent 018a32b commit 8453359

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Models/Remote.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ public partial class Remote
1010
private static partial Regex REG_HTTPS();
1111
[GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-/~%]+/[\w\-\.%]+(\.git)?$")]
1212
private static partial Regex REG_SSH1();
13-
[GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/~]+/[\w\-\.]+(\.git)?$")]
13+
[GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/~%]+/[\w\-\.%]+(\.git)?$")]
1414
private static partial Regex REG_SSH2();
1515

16-
[GeneratedRegex(@"^git@([\w\.\-]+):([\w\-/~]+/[\w\-\.]+)\.git$")]
16+
[GeneratedRegex(@"^git@([\w\.\-]+):([\w\-/~%]+/[\w\-\.%]+)\.git$")]
1717
private static partial Regex REG_TO_VISIT_URL_CAPTURE();
1818

1919
private static readonly Regex[] URL_FORMATS = [

src/Native/Windows.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public string FindTerminal(Models.ShellOrTerminal shell)
152152

153153
public void OpenBrowser(string url)
154154
{
155-
var info = new ProcessStartInfo("cmd", $"/c start {url}");
155+
var info = new ProcessStartInfo("cmd", $"/c start \"\" \"{url}\"");
156156
info.CreateNoWindow = true;
157157
Process.Start(info);
158158
}

0 commit comments

Comments
 (0)