Skip to content

Commit cc3c804

Browse files
committed
chore: update dep packages builder
1 parent ba2207b commit cc3c804

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

lib/apt.js

+20-16
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,16 @@ export default class {
207207
fs.writeFileSync( this.root + `/dists/${ codename }/${ this.config.component }/binary-all/Packages`, res.data.stdout );
208208

209209
// make "Packages.gz"
210-
pipeline(
211-
fs.createReadStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-all/Packages` ),
212-
zlib.createGzip( {
213-
"level": 9,
214-
} ),
215-
fs.createWriteStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-all/Packages.gz` ),
216-
e => {}
217-
);
210+
await new Promise( resolve => {
211+
pipeline(
212+
fs.createReadStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-all/Packages` ),
213+
zlib.createGzip( {
214+
"level": 9,
215+
} ),
216+
fs.createWriteStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-all/Packages.gz` ),
217+
e => resolve
218+
);
219+
} );
218220

219221
const architectures = glob( "binary-*", {
220222
"cwd": this.root + `/dists/${ codename }/${ this.config.component }`,
@@ -244,14 +246,16 @@ export default class {
244246
fs.writeFileSync( this.root + `/dists/${ codename }/${ this.config.component }/binary-${ architecture }/Packages`, res.data.stdout );
245247

246248
// make "Packages.gz"
247-
pipeline(
248-
fs.createReadStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-${ architecture }/Packages` ),
249-
zlib.createGzip( {
250-
"level": 9,
251-
} ),
252-
fs.createWriteStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-${ architecture }/Packages.gz` ),
253-
e => {}
254-
);
249+
await new Promise( resolve => {
250+
pipeline(
251+
fs.createReadStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-${ architecture }/Packages` ),
252+
zlib.createGzip( {
253+
"level": 9,
254+
} ),
255+
fs.createWriteStream( this.root + `/dists/${ codename }/${ this.config.component }/binary-${ architecture }/Packages.gz` ),
256+
e => resolve
257+
);
258+
} );
255259
}
256260

257261
fs.writeFileSync(

0 commit comments

Comments
 (0)