Make openssl check async
Summary: This was the last eslint warning for `flipper-server-core` and the only call-site was async already. Reviewed By: mweststrate Differential Revision: D32026626 fbshipit-source-id: 0d6f06086c33707b26f58f668ad533daca9de7dd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
72ce759e61
commit
dc6dd47a23
@@ -173,7 +173,7 @@ export default class CertificateProvider {
|
||||
if (csr === '') {
|
||||
return Promise.reject(new Error(`Received empty CSR from ${os} device`));
|
||||
}
|
||||
this.ensureOpenSSLIsAvailable();
|
||||
await this.ensureOpenSSLIsAvailable();
|
||||
const rootFolder = await promisify(tmp.dir)();
|
||||
const certFolder = rootFolder + '/FlipperCerts/';
|
||||
const certsZipPath = rootFolder + '/certs.zip';
|
||||
@@ -249,8 +249,8 @@ export default class CertificateProvider {
|
||||
return Promise.resolve('unknown');
|
||||
}
|
||||
|
||||
private ensureOpenSSLIsAvailable(): void {
|
||||
if (!opensslInstalled()) {
|
||||
private async ensureOpenSSLIsAvailable(): Promise<void> {
|
||||
if (!(await opensslInstalled())) {
|
||||
const e = Error(
|
||||
"It looks like you don't have OpenSSL installed. Please install it to continue.",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user