Skip to content
Snippets Groups Projects
Commit 889212e5 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed a bug in whoami check.

parent 4bc12275
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ class EnvSetup():
self.debug = '-d' in args
if self.debug:
args.remove('-d')
whoami = subprocess.check_output(['whoami']).decode('utf-8')
whoami = subprocess.check_output(['whoami']).decode('utf-8').strip()
if whoami != 'root' and not self.debug:
log('This script should be run as root user.')
sys.exit(1)
......
......@@ -60,7 +60,7 @@ class Tester():
debug = '-d' in args
if debug:
args.remove('-d')
whoami = subprocess.check_output(['whoami']).decode('utf-8')
whoami = subprocess.check_output(['whoami']).decode('utf-8').strip()
if whoami != 'root' and not debug:
log('This script should be run as root user.')
sys.exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment