aboutsummaryrefslogtreecommitdiff
path: root/grok-shell
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-05-28 14:01:36 -0500
committerAndy Doan <andy.doan@linaro.org>2015-05-28 14:22:45 -0500
commit4683df0c91e2e660377908355166cc3100776b80 (patch)
tree7af2ec34a5b60a4ff9ab195ec51a7ee7eb85a1db /grok-shell
parent8b870ce8f3ecd8b613de047260bca8bf7472a0a8 (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-xgrok-shell4
1 files changed, 1 insertions, 3 deletions
diff --git a/grok-shell b/grok-shell
index 5c67281..16b7c34 100755
--- a/grok-shell
+++ b/grok-shell
@@ -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])