Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 760fd5a

Browse files
Merge pull request #355 from gadfly3173/fix/edit-remote
fix: remove null-check of sshKey in EditRemote
2 parents 6917883 + 04c9214 commit 760fd5a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎src/ViewModels/EditRemote.cs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,8 @@ public static ValidationResult ValidateRemoteURL(string url, ValidationContext c
9393

9494
public static ValidationResult ValidateSSHKey(string sshkey, ValidationContext ctx)
9595
{
96-
if (ctx.ObjectInstance is EditRemote edit&& edit.UseSSH)
96+
if (ctx.ObjectInstance is EditRemote {_useSSH:true}&& !string.IsNullOrEmpty(sshkey))
9797
{
98-
if (string.IsNullOrEmpty(sshkey))
99-
return new ValidationResult("SSH private key is required");
100-
10198
if (!File.Exists(sshkey))
10299
return new ValidationResult("Given SSH private key can NOT be found!");
103100
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /