File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
packages/compass-e2e-tests/helpers Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -949,18 +949,20 @@ async function getCompassBuildMetadata(): Promise<BinPathOptions> {
949949}
950950
951951export async function buildCompass (
952- force = false ,
953952 compassPath = COMPASS_DESKTOP_PATH
954953) : Promise < void > {
955- if ( ! force ) {
956- try {
957- await getCompassBuildMetadata ( ) ;
958- return ;
959- } catch ( e ) {
960- // No compass build found, let's build it
961- }
954+ try {
955+ await getCompassBuildMetadata ( ) ;
956+ return ;
957+ } catch ( e ) {
958+ /* ignore */
959+ }
960+
961+ if ( process . env . COMPASS_APP_PATH && process . env . COMPASS_APP_NAME ) {
962+ throw new Error ( 'We did not expect to have to build Compass' ) ;
962963 }
963964
965+ debug ( "No Compass build found, let's build it" ) ;
964966 await packageCompassAsync ( {
965967 dir : compassPath ,
966968 skip_installer : true ,
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export async function mochaGlobalSetup(this: Mocha.Runner) {
139139
140140 if ( isTestingDesktop ( context ) ) {
141141 if ( context . testPackagedApp ) {
142- debug ( 'Building Compass before running the tests ...' ) ;
142+ debug ( 'Maybe building Compass before running the tests ...' ) ;
143143 await buildCompass ( ) ;
144144 } else {
145145 debug ( 'Preparing Compass before running the tests' ) ;
You can’t perform that action at this time.
0 commit comments