Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tldr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ def update():
os.chdir(repo_directory)
click.echo("Check for updates...")

local = subprocess.check_output('git rev-parse master'.split()).strip()
local = subprocess.check_output('git rev-parse main'.split()).strip()
remote = subprocess.check_output(
'git ls-remote https://github.com/tldr-pages/tldr/ HEAD'.split()
).split()[0]
if local != remote:
click.echo("Updating...")
subprocess.check_call('git checkout master'.split())
subprocess.check_call('git checkout main'.split())
subprocess.check_call('git pull --rebase'.split())
build_index()
click.echo("Update to the latest and rebuild the index.")
Expand Down