File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
components/intercept/config Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,14 @@ class ElectronConfig extends React.Component<{
142142 }
143143
144144 selectApplication = async ( ) => {
145- const pathToApplication = await uploadFile ( 'path' ) ;
145+ const pathToApplication = platform == 'mac'
146+ ? window . prompt (
147+ // Mac Electron doesn't allow file pickers inside .app bundles, and does very weird things
148+ // if you select the whole bundle, scanning everything within, so we require manual entry:
149+ "Please enter the path to the Electron application:"
150+ )
151+ : await uploadFile ( 'path' ) ;
152+
146153 if ( ! pathToApplication ) {
147154 this . props . closeSelf ( ) ;
148155 return ;
@@ -177,12 +184,13 @@ class ElectronConfig extends React.Component<{
177184 return < ConfigContainer >
178185 < p >
179186 Start an Electron { binary } with HTTP Toolkit's settings injected,
180- to intercept all its HTTP & HTTPS traffic .
187+ to intercept all its HTTP & HTTPS traffic.
181188 </ p >
182189 {
183190 platform === 'mac' && previousElectronAppPaths . length < 2 && < p >
184- To run a Mac .app bundle, select the executable within. It's typically
185- in Contents/MacOS inside the bundle.
191+ For .app bundles, enter either the bundle name (with or without .app)
192+ or the full path to the executable itself, typically stored in
193+ Contents/MacOS inside the bundle.
186194 </ p >
187195 }
188196 < p >
Original file line number Diff line number Diff line change @@ -272,8 +272,10 @@ const INTERCEPT_OPTIONS: _.Dictionary<InterceptorConfig> = {
272272 description : [ "Launch an Electron application with all its traffic intercepted" ] ,
273273 iconProps : SourceIcons . Electron ,
274274 uiConfig : ElectronCustomUi ,
275- checkRequirements : ( { interceptorVersion } ) => {
276- return versionSatisfies ( interceptorVersion , "^1.0.1" )
275+ checkRequirements : ( { serverVersion, interceptorVersion } ) => {
276+ return navigator . platform . startsWith ( 'Mac' )
277+ ? versionSatisfies ( serverVersion , '^1.10.1' )
278+ : versionSatisfies ( interceptorVersion , "^1.0.1" )
277279 } ,
278280 tags : [ 'electron' , 'desktop' , 'postman' ]
279281 } ,
You can’t perform that action at this time.
0 commit comments