Skip to content

Commit 7a2c0b4

Browse files
committed
refactor: shorter prompting for private key file path
1 parent 76a271f commit 7a2c0b4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

client/src/components/profile.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,10 @@ export class ProfileConfig {
585585
ProfilePromptType.PrivateKeyFilePath,
586586
profileClone.privateKeyFilePath,
587587
);
588-
if (profileClone.privateKeyFilePath === undefined) {
588+
if (
589+
profileClone.privateKeyFilePath === undefined ||
590+
profileClone.privateKeyFilePath === ""
591+
) {
589592
return;
590593
}
591594

@@ -806,10 +809,8 @@ const input: ProfilePromptInput = {
806809
},
807810
[ProfilePromptType.PrivateKeyFilePath]: {
808811
title: l10n.t("Private Key File Path (optional)"),
809-
placeholder: l10n.t("Enter the private key file path"),
810-
description: l10n.t(
811-
"Enter the local path of the private key file. Leave empty to use SSH Agent.",
812-
),
812+
placeholder: l10n.t("Enter the local private key file path"),
813+
description: l10n.t("Leave empty to use SSH Agent or password."),
813814
},
814815
};
815816

client/test/components/profile/profile.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,8 @@ describe("Profiles", async function () {
975975
name: "Private Key File Path",
976976
prompt: ProfilePromptType.PrivateKeyFilePath,
977977
wantTitle: "Private Key File Path (optional)",
978-
wantDescription:
979-
"Enter the local path of the private key file. Leave empty to use SSH Agent.",
980-
wantPlaceHolder: "Enter the private key file path",
978+
wantDescription: "Leave empty to use SSH Agent or password.",
979+
wantPlaceHolder: "Enter the local private key file path",
981980
},
982981
];
983982

0 commit comments

Comments
 (0)