Skip to content

Commit

Permalink
Fix postinstall script issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Sep 5, 2024
1 parent 32f8202 commit ef6fc5f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { exec } from 'child_process';
import os from 'os';
import { promises as fs } from 'fs';
import path from 'path';
import unzipper from 'unzipper';
import archiver from 'archiver';
/* eslint-disable @typescript-eslint/no-var-requires */
const { exec } = require('child_process');
const os = require('os');
const fs = require('fs').promises;
const path = require('path');
const unzipper = require('unzipper');
const archiver = require('archiver');

const __dirname = path.dirname(new URL(import.meta.url).pathname);
const appxFilePath = path.resolve(__dirname, '../out/make/JeromeThayananthajothy.CometApp.appx');
const outputAppxPath = path.resolve(__dirname, '../out/make/JeromeThayananthajothy.CometApp-modified.appx');
const tempDir = path.resolve(__dirname, '../temp/appx');
Expand Down Expand Up @@ -47,11 +47,11 @@ async function modifyManifest() {
const output = fs.createWriteStream(outputAppxPath);
const archive = archiver('zip', { zlib: { level: 9 } });

output.on('close', () => {
output.on('close', function () {
console.log(`${archive.pointer()} total bytes written`);
});

archive.on('error', (err) => {
archive.on('error', function (err) {
throw err;
});

Expand Down

0 comments on commit ef6fc5f

Please sign in to comment.