@@ -42,8 +42,8 @@ export abstract class OrgOpenCommandBase<T> extends SfCommand<T> {
4242 // NOTE: Deliberate use of `||` here since getBoolean() defaults to false, and we need to consider both env vars.
4343 const containerMode = env . getBoolean ( 'SF_CONTAINER_MODE' ) || env . getBoolean ( 'SFDX_CONTAINER_MODE' ) ;
4444
45- // security warning only for --json OR -- url-only OR containerMode
46- if ( flags [ 'url-only' ] || this . jsonEnabled ( ) || containerMode ) {
45+ // security warning only for --url-only OR containerMode
46+ if ( flags [ 'url-only' ] || containerMode ) {
4747 const sharedMessages = Messages . loadMessages ( '@salesforce/plugin-org' , 'messages' ) ;
4848 this . warn ( sharedMessages . getMessage ( 'SecurityWarning' ) ) ;
4949 this . log ( '' ) ;
@@ -72,15 +72,13 @@ export abstract class OrgOpenCommandBase<T> extends SfCommand<T> {
7272 handleDomainError ( err , url , env ) ;
7373 }
7474
75- if ( this . jsonEnabled ( ) ) {
76- const cp = await utils . openUrl ( url , {
77- ...( flags . browser ? { app : { name : apps [ flags . browser ] } } : { } ) ,
78- ...( flags . private ? { newInstance : platform ( ) === 'darwin' , app : { name : apps . browserPrivate } } : { } ) ,
79- } ) ;
80- cp . on ( 'error' , ( err ) => {
81- throw SfError . wrap ( err ) ;
82- } ) ;
83- }
75+ const cp = await utils . openUrl ( url , {
76+ ...( flags . browser ? { app : { name : apps [ flags . browser ] } } : { } ) ,
77+ ...( flags . private ? { newInstance : platform ( ) === 'darwin' , app : { name : apps . browserPrivate } } : { } ) ,
78+ } ) ;
79+ cp . on ( 'error' , ( err ) => {
80+ throw SfError . wrap ( err ) ;
81+ } ) ;
8482
8583 return output ;
8684 }
0 commit comments