anchor.diff:  
   shell(_Config, _AppFile) ->
       true = code:add_pathz(rebar_utils:ebin_dir()),
  +    %% scan all processes for any with references to the old user and save them to
  +    %% update later
  +    NeedsUpdate = [Pid || Pid <- erlang:processes(),
  +        proplists:get_value(group_leader, erlang:process_info(Pid)) == whereis(user)
  +    ],
       %% terminate the current user
       ok = supervisor:terminate_child(kernel_sup, user),
       %% start a new shell (this also starts a new user under the correct group)
  -    user_drv:start(),
  +    _ = user_drv:start(),
  +    %% wait until user_drv and user have been registered (max 3 seconds)
  +    ok = wait_until_user_started(3000),
  +    %% set any process that had a reference to the old user's group leader to the
  +    %% new user process
  +    _ = [erlang:group_leader(whereis(user), Pid) || Pid <- NeedsUpdate],
       %% enable error_logger's tty output
       ok = error_logger:swap_handler(tty),
       %% disable the simple error_logger (which may have been added multiple
  
positive.code:     case gen_event:delete_handler(error_logger, error_logger, []) of
          {error, module_not_found} -> ok;
          {error_logger, _} -> remove_error_handler(N-1)
      end.
negative.code: 
  info(help, shell) ->
      ?CONSOLE(
          "Start a shell with project and deps preloaded similar to~n"
          "'erl -pa ebin -pa deps/*/ebin'.~n",
          []
      ).
  
  remove_error_handler(0) ->
      ?WARN("Unable to remove simple error_logger handler~n", []);
  