• Bruce Dawson's avatar
    Fix command prompt title after update_depot_tools · 3fb1d569
    Bruce Dawson authored
    Windows has a bug where it sometimes doesn't reset the command prompt
    title when a batch file finishes executing. A simple repro is shown
    here:
    
    b1.bat:
    echo In b1
    if 1 == 1 (
      b2.bat
    )
    
    b2.bat:
    echo In b2
    
    If you run b1.bat then "b1" will stay as the title when the batch files
    finish running. The solution is to use "call" followed by "exit".
    
    This bug is particularly annoying when using tabs in the new Windows
    Terminal. By working around the bug this makes it so that the tab titles
    return to being useful indicators of when a batch file is completed.
    
    A previous fix of this bug (in a different batch file) can be seen in
    crrev.com/c/2133303.
    
    Change-Id: Id563f3102751a91f46c5b25ce610af9ec7ab240a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2225340Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    3fb1d569
update_depot_tools.bat 2.01 KB