File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,6 @@ def load_workspace(config_file, args):
254
254
:param type: string
255
255
256
256
"""
257
- logger .info ('Loading %s.' % config_file )
258
257
259
258
sconfig = kaptan .Kaptan ()
260
259
sconfig = sconfig .import_config (config_file ).get ()
@@ -276,12 +275,13 @@ def load_workspace(config_file, args):
276
275
tmux_bin = util .which ('tmux' )
277
276
278
277
try :
278
+ logger .info ('Loading %s.' % config_file )
279
279
builder .build ()
280
280
281
281
if 'TMUX' in os .environ :
282
- if args .answer_yes or prompt_yes_no (
282
+ if not args . detached and ( args .answer_yes or prompt_yes_no (
283
283
'Already inside TMUX, switch to session?'
284
- ):
284
+ )) :
285
285
tmux_env = os .environ .pop ('TMUX' )
286
286
builder .session .switch_client ()
287
287
@@ -293,7 +293,9 @@ def load_workspace(config_file, args):
293
293
if not args .detached :
294
294
builder .session .attach_session ()
295
295
except exc .TmuxSessionExists as e :
296
- if args .answer_yes or prompt_yes_no ('%s Attach?' % e ):
296
+ if not args .detached and (
297
+ args .answer_yes or prompt_yes_no ('%s Attach?' % e )
298
+ ):
297
299
if 'TMUX' in os .environ :
298
300
builder .session .switch_client ()
299
301
You can’t perform that action at this time.
0 commit comments