Skip to content

added keygenPromise#22

Open
misogihagi wants to merge 5 commits into
ericvicenti:masterfrom
misogihagi:master
Open

added keygenPromise#22
misogihagi wants to merge 5 commits into
ericvicenti:masterfrom
misogihagi:master

Conversation

@misogihagi
Copy link
Copy Markdown

#21
and merged #13

@micalevisk
Copy link
Copy Markdown

I've added this feature in my fork: https://www.npmjs.com/package/@micalevisk/ssh-keygen

You just need to supress the second parameter to make it return a Promise instead.

async function runPromiseVersion() {
  try {
    const out = await keygen({
      comment: 'john@doe.com',
      read: true,
    });

    console.log('Done generating key pairs');
    console.log(out.key);
    console.log(out.pubKey);
  } catch (err) {
    console.log('There was a problem:', err);
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants