mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
4ef3ea2afe
commit
98d851aff7
@ -7,17 +7,17 @@ import execFileInjectable from "../fs/exec-file.injectable";
|
||||
import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
|
||||
|
||||
const pemEncoding = (hexEncodedCert: String) => {
|
||||
const certData = Buffer.from(hexEncodedCert, "hex").toString('base64');
|
||||
const lines = ['-----BEGIN CERTIFICATE-----'];
|
||||
const certData = Buffer.from(hexEncodedCert, "hex").toString("base64");
|
||||
const lines = ["-----BEGIN CERTIFICATE-----"];
|
||||
|
||||
for (let i = 0; i < certData.length; i += 64) {
|
||||
lines.push(certData.substring(i, i + 64));
|
||||
}
|
||||
|
||||
lines.push('-----END CERTIFICATE-----', '');
|
||||
|
||||
|
||||
lines.push("-----END CERTIFICATE-----", "");
|
||||
|
||||
return lines.join("\r\n");
|
||||
}
|
||||
};
|
||||
|
||||
const requestSystemCAsInjectable = getInjectable({
|
||||
id: "request-system-cas",
|
||||
@ -31,7 +31,7 @@ const requestSystemCAsInjectable = getInjectable({
|
||||
* directly fails to load "child_process" correctly on renderer
|
||||
*/
|
||||
const output = await execFile(wincaRootsExePath);
|
||||
|
||||
|
||||
return output
|
||||
.split("\r\n")
|
||||
.filter(Boolean)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user