[steal-pty] made sudo conditional