fix bug where it requires some argv or it will crash
This commit is contained in:
parent
11a457a6f1
commit
04a362e01b
1 changed files with 1 additions and 1 deletions
2
nboard
2
nboard
|
@ -142,7 +142,7 @@ bugs and stuff:
|
|||
please report any bugs to ~xfnw on IRC, anywhere you can find him, or
|
||||
on the tildegit page, https://tildegit.org/xfnw/nboard
|
||||
""")
|
||||
elif sys.argv[1] == 'pull':
|
||||
elif len(sys.argv) > 1 and sys.argv[1] == 'pull':
|
||||
branches=subprocess.run(['git','--dir-dir='+os.path.expanduser('~')+'/.nboard','for-each-ref','refs/remotes','--format','%(rename)'], capture_output=True).stdout.decode().splitlines()
|
||||
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard','pull','--all'])
|
||||
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard','merge']+branches)
|
||||
|
|
Loading…
Reference in a new issue