From 3a796fc328c6f068d2431ae07113d99f82b94f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Tue, 3 Nov 2020 14:54:31 +0100 Subject: [PATCH] Kill sudo once we don't need it anymore Calling "sudo -k" ensures we don't let dangling sudo session in the current shell. Change-Id: Ibe324afe2d251f5b71dedc02230bbcfa13888996 --- scripts/run-local-test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/run-local-test b/scripts/run-local-test index 1983ea8ed..c9437258a 100755 --- a/scripts/run-local-test +++ b/scripts/run-local-test @@ -80,6 +80,9 @@ fi # Display list of installed packages with versions (debugging failures) "${HOME}/test-python/bin/pip" freeze +# Ensure we don't keep any dangling sudo session in the shell +sudo -k + # Run local test PS1="[\u@\h \W]\$" source "${HOME}/test-python/bin/activate" source "${PROJECT_DIR}/ansible-test-env.rc"