File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/build/src/packaging/package Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export async function createDebianPackage(
19
19
execFile : typeof execFileFn = execFileFn
20
20
) : Promise < void > {
21
21
console . info ( 'mongosh: writing deb package' ) ;
22
- const size = await estimatePackageSize ( pkg ) ;
22
+ const size = await estimatePackageSizeKb ( pkg ) ;
23
23
const dir = await generateDirFromTemplate ( templateDir , {
24
24
...pkg . metadata ,
25
25
size,
@@ -56,12 +56,12 @@ export async function createDebianPackage(
56
56
await promisify ( rimraf ) ( dir ) ;
57
57
}
58
58
59
- async function estimatePackageSize ( pkg : PackageInformation ) {
59
+ async function estimatePackageSizeKb ( pkg : PackageInformation ) {
60
60
let size = 0 ;
61
61
for ( const { sourceFilePath } of pkg . binaries ) {
62
62
size += ( await fs . stat ( sourceFilePath ) ) . size ;
63
63
}
64
- return size ;
64
+ return Math . ceil ( size / 1024 ) ;
65
65
}
66
66
67
67
async function generateDebianCopyright ( pkg : PackageInformation ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments