We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c3ebba commit ce43061Copy full SHA for ce43061
packages/core/src/awsService/ec2/sshKeyPair.ts
@@ -34,7 +34,7 @@ export class SshKeyPair {
34
35
public static async generateSshKeyPair(keyPath: string): Promise<void> {
36
const keyGenerated = await this.tryKeyTypes(keyPath, ['ed25519', 'rsa'])
37
- if (!keyGenerated) {
+ if (!keyGenerated || !(await fs.existsFile(keyPath))) {
38
throw new ToolkitError('ec2: Unable to generate ssh key pair')
39
}
40
await fs.chmod(keyPath, 0o600)
0 commit comments