diff --git a/tests/data/stubs/stub-sudo.py b/tests/data/stubs/stub-sudo.py new file mode 100755 index 00000000..ff88cd8e --- /dev/null +++ b/tests/data/stubs/stub-sudo.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import json +import os +import sys + +os.environ['ORIGINAL_ARGV'] = json.dumps(sys.argv) +os.environ['THIS_IS_STUB_SUDO'] = '1' +os.execv(sys.executable, sys.argv[sys.argv.index('--') + 1:])