File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,16 @@ import path from 'path';
22import { promises as fs , constants as fsConstants } from 'fs' ;
33import type { MongoshBus } from '@mongosh/types' ;
44
5- export const SHARED_LIBRARY_SUFFIX =
5+ type SharedObjectSuffix = 'so' | 'dylib' | 'dll' ;
6+ export const SHARED_LIBRARY_SUFFIX : SharedObjectSuffix =
67 process . platform === 'win32'
78 ? 'dll'
89 : process . platform === 'darwin'
910 ? 'dylib'
1011 : 'so' ;
1112
1213export interface CryptLibraryPathResult {
13- cryptSharedLibPath ?: string ;
14+ cryptSharedLibPath ?: `${ string } mongo_crypt_v${ number } .${ SharedObjectSuffix } ` ;
1415 expectedVersion ?: { version : bigint ; versionStr : string } ;
1516}
1617
@@ -54,7 +55,7 @@ export async function getCryptLibraryPaths(
5455 ) ,
5556 // Location of the shared library in the zip and tgz packages
5657 path . resolve ( bindir , `mongosh_crypt_v1.${ SHARED_LIBRARY_SUFFIX } ` ) ,
57- ] ) {
58+ ] as Array < `${ string } mongo_crypt_v1.${ SharedObjectSuffix } ` > ) {
5859 try {
5960 const permissionsMismatch = await ensureMatchingPermissions (
6061 libraryCandidate ,
You can’t perform that action at this time.
0 commit comments