File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11import tmp from 'tmp'
2+ import path from 'path'
23import debug from 'debug'
3- import Logger from './Logger'
4- import AirBrake from './AirBrake'
54import Environment from './Environment'
65import EventBus from './EventBus'
76import Installer from './Installer'
@@ -77,7 +76,12 @@ class BinaryInstaller {
7776 } else {
7877 if ( existsSync ( Environment . userPath ) ) commands . push ( `rm -rf ${ Environment . userPath } ` )
7978 if ( existsSync ( Environment . adminPath ) ) commands . push ( `rm -rf ${ Environment . adminPath } ` )
80- if ( existsSync ( Environment . binPath ) ) commands . push ( `rm -rf ${ Environment . binPath } ` )
79+ installers . map ( installer => {
80+ const files = installer . dependencyNames . concat ( installer . binaryName )
81+ files . map (
82+ file => installer . fileExists ( file ) && commands . push ( `rm -f ${ path . join ( Environment . binPath , file ) } ` )
83+ )
84+ } )
8185 }
8286
8387 await commands . exec ( )
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ export const UNIX_BINARIES = '/usr/local/bin/'
2525export const UNIX_USER_SETTINGS = path . join ( os . homedir ( ) , '.remoteit' )
2626export const UNIX_ADMIN_SETTINGS = '/etc/remoteit'
2727
28- // export const WIN_BINARIES = path.join(os.homedir(), 'AppData/Local/remoteit/bin')
2928export const WIN_BINARIES = path . normalize ( '/Program Files/remoteit/' )
3029export const WIN_USER_SETTINGS = path . join ( os . homedir ( ) , 'AppData/Local/remoteit' )
3130export const WIN_ADMIN_SETTINGS = path . normalize ( '/ProgramData/remoteit' )
You can’t perform that action at this time.
0 commit comments