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):
254254 :param type: string
255255
256256 """
257- logger .info ('Loading %s.' % config_file )
258257
259258 sconfig = kaptan .Kaptan ()
260259 sconfig = sconfig .import_config (config_file ).get ()
@@ -276,12 +275,13 @@ def load_workspace(config_file, args):
276275 tmux_bin = util .which ('tmux' )
277276
278277 try :
278+ logger .info ('Loading %s.' % config_file )
279279 builder .build ()
280280
281281 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 (
283283 'Already inside TMUX, switch to session?'
284- ):
284+ )) :
285285 tmux_env = os .environ .pop ('TMUX' )
286286 builder .session .switch_client ()
287287
@@ -293,7 +293,9 @@ def load_workspace(config_file, args):
293293 if not args .detached :
294294 builder .session .attach_session ()
295295 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+ ):
297299 if 'TMUX' in os .environ :
298300 builder .session .switch_client ()
299301
You can’t perform that action at this time.
0 commit comments