Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/compass-smoke-tests/src/installers/windows-msi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import assert from 'node:assert/strict';
import path from 'node:path';
import fs from 'node:fs';

import createDebug from 'debug';

import type { InstalledAppInfo, InstallablePackage } from './types';
Expand Down Expand Up @@ -46,9 +48,8 @@ export function installWindowsMSI({
'/passive',
`APPLICATIONROOTDIRECTORY=${installDirectory}`,
]);

// Check that the executable will run without being quarantined or similar
execute(appPath, ['--version']);
// Check if the app executable exists after installing
assert(fs.existsSync(appPath), `Expected ${appPath} to exist`);

return {
appName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export function installWindowsSetup({
'Expected an entry in the registry with the install location'
);
const appExecutablePath = path.resolve(appPath, `${appName}.exe`);
execute(appExecutablePath, ['--version']);

// Check if the app executable exists after installing
assert(
fs.existsSync(appExecutablePath),
`Expected ${appExecutablePath} to exist`
);

return {
appName,
Expand Down
5 changes: 3 additions & 2 deletions packages/compass-smoke-tests/src/installers/windows-zip.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import assert from 'node:assert/strict';
import path from 'node:path';
import fs from 'node:fs';

import type { InstalledAppInfo, InstallablePackage } from './types';
import { execute } from '../execute';
Expand All @@ -16,8 +17,8 @@ export function installWindowsZIP({

execute('unzip', [filepath, '-d', sandboxPath]);

// see if the executable will run without being quarantined or similar
execute(appPath, ['--version']);
// Check if the app executable exists after unzipping
assert(fs.existsSync(appPath), `Expected ${appPath} to exist`);

return {
appName,
Expand Down
Loading