diff options
author | Andy Doan <andy.doan@linaro.org> | 2015-05-28 14:01:36 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2015-05-28 14:22:45 -0500 |
commit | 4683df0c91e2e660377908355166cc3100776b80 (patch) | |
tree | 7af2ec34a5b60a4ff9ab195ec51a7ee7eb85a1db /grok-shell | |
parent | 8b870ce8f3ecd8b613de047260bca8bf7472a0a8 (diff) |
grok-shell: handle no-argument command
gitolite supports running a command like:
ssh git@git-ie.linaro.org
which defaults to the "info" command:
https://github.com/sitaramc/gitolite/blob/4ed15ad8e5d82995b3d55cd17446fc90a3c2b7ec/src/gitolite-shell#L153
our grok-shell was exiting with an error. This gets things compatible
again
Change-Id: I5f62365522e2ad6da2e2ab5ef941b07eaa15d596
Diffstat (limited to 'grok-shell')
-rwxr-xr-x | grok-shell | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -98,9 +98,7 @@ if __name__ == '__main__': ''' setup_logging() - cmd = os.environ.get('SSH_ORIGINAL_COMMAND') - if not cmd: - sys.exit('ERROR: script must be called from ssh context') + cmd = os.environ.get('SSH_ORIGINAL_COMMAND', 'info') if len(sys.argv) < 2 or sys.argv[1] not in ('slave', 'master'): sys.exit('Usage: %s [slave|master] ...' % sys.argv[0]) |