File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/compass-e2e-tests/installers Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1+ import path from 'path' ;
12import { existsSync } from 'fs' ;
23import type { InstalledAppInfo , Package } from './types' ;
34import { execute } from './helpers' ;
@@ -35,8 +36,19 @@ export async function installMacDMG(
3536 '--version' ,
3637 ] ) ;
3738
38- // by my calculations this should crash
39- await execute ( `/Applications/${ appName } .app/Contents/MacOS/${ appName } ` , [ ] ) ;
39+ if ( process . env . HOME ) {
40+ const settingsDir = path . resolve (
41+ process . env . HOME ,
42+ 'Library' ,
43+ 'Application Support' ,
44+ appName
45+ ) ;
46+
47+ if ( existsSync ( settingsDir ) ) {
48+ console . log ( `${ settingsDir } already exists. Removing.` ) ;
49+ await execute ( 'rm' , [ '-rf' , settingsDir ] ) ;
50+ }
51+ }
4052
4153 return Promise . resolve ( {
4254 appName,
You can’t perform that action at this time.
0 commit comments