Skip to content

Commit

Permalink
Convert double quotes to single quotes
Browse files Browse the repository at this point in the history
For consistency.
  • Loading branch information
TheJaredWilcurt authored Oct 5, 2023
1 parent a8de567 commit dbf112e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/install.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import compressing from 'compressing';
import progress from 'cli-progress';
import semver from 'semver';

import nodeManifest from "../package.json" assert { type: "json" };
import nodeManifest from "../package.json" assert { type: 'json' };

/**
* NW.js build flavor
Expand Down Expand Up @@ -92,38 +92,38 @@ if (parsedUrl.protocol === 'file:') {
get(url, (response) => {

let chunks = 0;
bar.start(Number(response.headers["content-length"]), 0);
response.on("data", async (chunk) => {
bar.start(Number(response.headers['content-length']), 0);
response.on('data', async (chunk) => {
chunks += chunk.length;
bar.increment();
bar.update(chunks);
});

response.on("error", () => {
response.on('error', () => {
rmSync(dest, {
recursive: true,
force: true,
});
});

response.on("end", () => {
if (platform === "linux") {
compressing.tgz.uncompress(dest, ".")
response.on('end', () => {
if (platform === 'linux') {
compressing.tgz.uncompress(dest, '.')
.then(() => rmSync(dest, {
recursive: true,
force: true,
}))
.then(() => {
renameSync(`nwjs-v${versionString}-${platform}-${arch}`, "nwjs");
renameSync(`nwjs-v${versionString}-${platform}-${arch}`, 'nwjs');
});
} else {
compressing.zip.uncompress(dest, ".")
compressing.zip.uncompress(dest, '.')
.then(() => rmSync(dest, {
recursive: true,
force: true,
}))
.then(() => {
renameSync(`nwjs-v${versionString}-${platform}-${arch}`, "nwjs");
renameSync(`nwjs-v${versionString}-${platform}-${arch}`, 'nwjs');
});
}
});
Expand Down

0 comments on commit dbf112e

Please sign in to comment.