mirror of
https://github.com/ARM-software/devlib.git
synced 2025-07-08 06:42:42 +01:00
android: fixing exit code checking
This fixes an issue introduced in
64261a65cb
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user