mirror of
https://github.com/ARM-software/devlib.git
synced 2025-09-23 12:21:54 +01:00
utils/ssh, host: Remove sudo prompt from output
On a target where sudo is required, target.file_exists() erroneously returns True despite the execute() output being: '[sudo] password for valsch01: 0\n' The sudo prompt is being written to stderr (as per sudo -S), but this is still merged into the final execute() output. Get rid of the prompt to prevent it from interfering with any command output processor. Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
This commit is contained in:
committed by
Marc Bonnici
parent
822c50273f
commit
1381944e5b
@@ -286,7 +286,7 @@ class SshConnectionBase(ConnectionBase):
|
||||
keyfile=None,
|
||||
port=None,
|
||||
platform=None,
|
||||
sudo_cmd="sudo -S -- sh -c {}",
|
||||
sudo_cmd="sudo -p ' ' -S -- sh -c {}",
|
||||
strict_host_check=True,
|
||||
):
|
||||
super().__init__()
|
||||
@@ -369,7 +369,7 @@ class SshConnection(SshConnectionBase):
|
||||
port=22,
|
||||
timeout=None,
|
||||
platform=None,
|
||||
sudo_cmd="sudo -S -- sh -c {}",
|
||||
sudo_cmd="sudo -p ' ' -S -- sh -c {}",
|
||||
strict_host_check=True,
|
||||
use_scp=False,
|
||||
poll_transfers=False,
|
||||
|
Reference in New Issue
Block a user