mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 04:56:25 +08:00
main: refactor shell flag
This commit is contained in:
@@ -106,13 +106,13 @@ def run_agent(client_factory):
|
|||||||
|
|
||||||
public_key = conn.get_public_key(label=label)
|
public_key = conn.get_public_key(label=label)
|
||||||
|
|
||||||
use_shell = False
|
|
||||||
if args.connect:
|
if args.connect:
|
||||||
command = ssh_args(label) + args.command
|
command = ssh_args(label) + args.command
|
||||||
log.debug('SSH connect: %r', command)
|
log.debug('SSH connect: %r', command)
|
||||||
|
|
||||||
if args.shell:
|
use_shell = bool(args.shell)
|
||||||
command, use_shell = os.environ['SHELL'], True
|
if use_shell:
|
||||||
|
command = os.environ['SHELL']
|
||||||
log.debug('using shell: %r', command)
|
log.debug('using shell: %r', command)
|
||||||
|
|
||||||
if not command:
|
if not command:
|
||||||
|
|||||||
Reference in New Issue
Block a user