Skip to content

Commit

Permalink
fix: fix waitForUser async usage
Browse files Browse the repository at this point in the history
  • Loading branch information
davewasmer committed Apr 28, 2017
1 parent 760961e commit 9fd27c5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/root-authority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,11 @@ async function openCertificateInFirefox(firefoxPath: string): Promise<void> {
res.end();
}).listen(port);
debug('certificate is hosted, starting firefox at hosted URL');
await new Promise((resolve) => {
console.log(`Unable to automatically install SSL certificate - please follow the prompts at http://localhost:${ port } in Firefox to trust the root certificate`);
console.log('See https://github.com/davewasmer/devcert#how-it-works for more details');
console.log('-- Press <Enter> once you finish the Firefox prompts --');
exec(`${ firefoxPath } http://localhost:${ port }`);
waitForUser();
});
console.log(`Unable to automatically install SSL certificate - please follow the prompts at http://localhost:${ port } in Firefox to trust the root certificate`);
console.log('See https://github.com/davewasmer/devcert#how-it-works for more details');
console.log('-- Press <Enter> once you finish the Firefox prompts --');
exec(`${ firefoxPath } http://localhost:${ port }`);
await waitForUser();
}

// Try to install certutil if it's not already available, and return the path to the executable
Expand Down

0 comments on commit 9fd27c5

Please sign in to comment.