diff --git a/lib/gui/app/models/flash-state.ts b/lib/gui/app/models/flash-state.ts index a8a5af4d..524eaaab 100644 --- a/lib/gui/app/models/flash-state.ts +++ b/lib/gui/app/models/flash-state.ts @@ -115,15 +115,15 @@ export function getFlashState() { } export function wasLastFlashCancelled() { - return _.get(exports.getFlashResults(), ['cancelled'], false); + return _.get(getFlashResults(), ['cancelled'], false); } export function getLastFlashSourceChecksum(): string { - return exports.getFlashResults().sourceChecksum; + return getFlashResults().sourceChecksum; } export function getLastFlashErrorCode() { - return exports.getFlashResults().errorCode; + return getFlashResults().errorCode; } export function getFlashUuid() { diff --git a/lib/shared/drive-constraints.ts b/lib/shared/drive-constraints.ts index 719303b4..a5d941c7 100644 --- a/lib/shared/drive-constraints.ts +++ b/lib/shared/drive-constraints.ts @@ -175,47 +175,47 @@ export function getDriveImageCompatibilityStatuses( const statusList = []; // Mind the order of the if-statements if you modify. - if (exports.isSourceDrive(drive, image)) { + if (isSourceDrive(drive, image)) { statusList.push({ - type: exports.COMPATIBILITY_STATUS_TYPES.ERROR, + type: COMPATIBILITY_STATUS_TYPES.ERROR, message: messages.compatibility.containsImage(), }); - } else if (exports.isDriveLocked(drive)) { + } else if (isDriveLocked(drive)) { statusList.push({ - type: exports.COMPATIBILITY_STATUS_TYPES.ERROR, + type: COMPATIBILITY_STATUS_TYPES.ERROR, message: messages.compatibility.locked(), }); } else if ( !_.isNil(drive) && !_.isNil(drive.size) && - !exports.isDriveLargeEnough(drive, image) + !isDriveLargeEnough(drive, image) ) { const imageSize = (image.isSizeEstimated ? image.compressedSize : image.size) as number; const relativeBytes = imageSize - drive.size; statusList.push({ - type: exports.COMPATIBILITY_STATUS_TYPES.ERROR, + type: COMPATIBILITY_STATUS_TYPES.ERROR, message: messages.compatibility.tooSmall(prettyBytes(relativeBytes)), }); } else { - if (exports.isSystemDrive(drive)) { + if (isSystemDrive(drive)) { statusList.push({ - type: exports.COMPATIBILITY_STATUS_TYPES.WARNING, + type: COMPATIBILITY_STATUS_TYPES.WARNING, message: messages.compatibility.system(), }); } - if (exports.isDriveSizeLarge(drive)) { + if (isDriveSizeLarge(drive)) { statusList.push({ - type: exports.COMPATIBILITY_STATUS_TYPES.WARNING, + type: COMPATIBILITY_STATUS_TYPES.WARNING, message: messages.compatibility.largeDrive(), }); } - if (!_.isNil(drive) && !exports.isDriveSizeRecommended(drive, image)) { + if (!_.isNil(drive) && !isDriveSizeRecommended(drive, image)) { statusList.push({ - type: exports.COMPATIBILITY_STATUS_TYPES.WARNING, + type: COMPATIBILITY_STATUS_TYPES.WARNING, message: messages.compatibility.sizeNotRecommended(), }); } @@ -274,7 +274,5 @@ export function hasListDriveImageCompatibilityStatus( drives: DrivelistDrive[], image: Image, ) { - return Boolean( - exports.getListDriveImageCompatibilityStatuses(drives, image).length, - ); + return Boolean(getListDriveImageCompatibilityStatuses(drives, image).length); } diff --git a/lib/shared/permissions.ts b/lib/shared/permissions.ts index dddb176c..7468ab5b 100755 --- a/lib/shared/permissions.ts +++ b/lib/shared/permissions.ts @@ -88,7 +88,7 @@ function setEnvVarCmd(value: any, name: string): string { export function createLaunchScript( command: string, argv: string[], - environment: _.Dictionary, + environment: _.Dictionary, ): string { const isWindows = os.platform() === 'win32'; const lines = []; @@ -148,14 +148,14 @@ export async function elevateCommand( applicationName: string; }, ): Promise<{ cancelled: boolean }> { - if (await exports.isElevated()) { + if (await isElevated()) { await execFileAsync(command[0], command.slice(1), { env: options.environment, }); return { cancelled: false }; } const isWindows = os.platform() === 'win32'; - const launchScript = exports.createLaunchScript( + const launchScript = createLaunchScript( command[0], command.slice(1), options.environment,