Skip to content

Commit

Permalink
use parseInt instead of Number constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Nipheris committed Mar 21, 2024
1 parent 01fa12b commit 435e012
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/deb/deb-builder.mts
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ export class DebBuilder implements Deployer {

private async handleDeb(distribution: string, component: string, deb: DebDescriptor): Promise<void> {
const controlTarSizeRange = { start: 120, end: 129 };

// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
const controlTarSize = Number((await this.artifactProvider.getArtifactContent(deb.artifact, controlTarSizeRange)).read().toString()
.trim());
const controlTarSizeString =
(await this.artifactProvider.getArtifactContent(deb.artifact, controlTarSizeRange))
.read()
.toString()
.trim();
const controlTarSize = parseInt(controlTarSizeString, 10);
const controlTarRange = { start: 132, end: 131 + controlTarSize };

const controlTar = await this.artifactProvider.getArtifactContent(deb.artifact, controlTarRange);

const whereExtract = path.join(this.tempPath, `control-${deb.artifact.md5}`);

createDir(whereExtract);

let createFilePromise: Promise<void> | undefined = undefined;
Expand Down

0 comments on commit 435e012

Please sign in to comment.