1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

fix messages

This commit is contained in:
shimataro 2023-10-10 08:14:54 +09:00
parent d2f01f267a
commit 73ab492f2b
No known key found for this signature in database
GPG key ID: BE92C05736911A9D
2 changed files with 4 additions and 7 deletions

View file

@ -2837,7 +2837,7 @@ function setup() {
} }
console.log(`SSH key has been stored to ${sshDirName} successfully.`); console.log(`SSH key has been stored to ${sshDirName} successfully.`);
if (backedUpFileNames.length > 0) { if (backedUpFileNames.length > 0) {
console.log(`Following files are backed up in suffix "${backupSuffix}; ${backedUpFileNames.join(", ")}.`); console.log(`Following files are backed up in suffix "${backupSuffix}"; ${backedUpFileNames.join(", ")}.`);
} }
} }
/** /**
@ -2852,7 +2852,6 @@ function cleanup() {
} }
else { else {
restore(backupSuffix); restore(backupSuffix);
console.log(`Files that have suffix "${backupSuffix} has been restored successfully.`);
} }
} }
/** /**
@ -2909,7 +2908,7 @@ function restore(backupSuffix) {
fs_1.default.renameSync(pathNameBak, pathNameOrg); fs_1.default.renameSync(pathNameBak, pathNameOrg);
restoredFileNames.push(fileName); restoredFileNames.push(fileName);
} }
console.log(`Following files are restored; ${restoredFileNames.join(",")}`); console.log(`Following files in suffix "${backupSuffix}" are restored; ${restoredFileNames.join(", ")}`);
} }
/** /**
* create ".ssh" directory * create ".ssh" directory

View file

@ -119,7 +119,7 @@ function setup(): void {
console.log(`SSH key has been stored to ${sshDirName} successfully.`); console.log(`SSH key has been stored to ${sshDirName} successfully.`);
if (backedUpFileNames.length > 0) { if (backedUpFileNames.length > 0) {
console.log(`Following files are backed up in suffix "${backupSuffix}; ${backedUpFileNames.join(", ")}.`); console.log(`Following files are backed up in suffix "${backupSuffix}"; ${backedUpFileNames.join(", ")}.`);
} }
} }
@ -135,8 +135,6 @@ function cleanup(): void {
console.log(`SSH key in ${sshDirName} has been removed successfully.`); console.log(`SSH key in ${sshDirName} has been removed successfully.`);
} else { } else {
restore(backupSuffix); restore(backupSuffix);
console.log(`Files that have suffix "${backupSuffix} has been restored successfully.`);
} }
} }
@ -202,7 +200,7 @@ function restore(backupSuffix: string): void {
fs.renameSync(pathNameBak, pathNameOrg); fs.renameSync(pathNameBak, pathNameOrg);
restoredFileNames.push(fileName); restoredFileNames.push(fileName);
} }
console.log(`Following files are restored; ${restoredFileNames.join(",")}`); console.log(`Following files in suffix "${backupSuffix}" are restored; ${restoredFileNames.join(", ")}`);
} }
/** /**