diff options
author | Neil Williams <codehelp@debian.org> | 2015-11-06 15:44:09 +0000 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2015-11-06 15:44:09 +0000 |
commit | c7441bce40bd030435cb5c591ee5019e197880b4 (patch) | |
tree | 3388fa03c1fb8143881ee06070db190d3d9c746a /bin | |
parent | 47e9fad49eafd289da61c331550b78a23d013c90 (diff) | |
download | vmdebootstrap-c7441bce40bd030435cb5c591ee5019e197880b4.tar.gz |
Allow fast tests to be run without sudo
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/vmdebootstrap | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 9754451..addf072 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -216,10 +216,11 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth oldstable = distro.was_oldstable(datetime.date(2015, 4, 26)) uefi.check_settings(oldstable=oldstable) + if self.settings['dry-run']: + sys.exit(0) + self.start_ops() if os.geteuid() != 0: sys.exit("You need to have root privileges to run this script.") - if not self.settings['dry-run']: - self.start_ops() def _image_preparations(self): uefi = self.handlers[Uefi.name] |