mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
android: fixing exit code checking
This fixes an issue introduced in 64261a65cb8c4c7daeb35186f16d246d3211fa0a The addtional echo means that $? will always have "0" (the exit code for the echo). This removes the extra echo, prepending \n to $? instead
This commit is contained in:
parent
2d9c0bf8a5
commit
f52bf79eb6
@ -293,7 +293,7 @@ def adb_shell(device, command, timeout=None, check_exit_code=False, as_root=Fals
|
||||
escape_double_quotes(command))
|
||||
logger.debug(full_command)
|
||||
if check_exit_code:
|
||||
actual_command = "adb{} shell '({}); echo; echo $?'".format(device_string,
|
||||
actual_command = "adb{} shell '({}); echo \"\n$?\"'".format(device_string,
|
||||
escape_single_quotes(command))
|
||||
raw_output, error = check_output(actual_command, timeout, shell=True)
|
||||
if raw_output:
|
||||
|
Loading…
x
Reference in New Issue
Block a user