check postinstall

This commit is contained in:
Kload 2013-06-13 14:23:39 +02:00
parent 4433f1de89
commit 60cd26f2c8

View file

@ -187,7 +187,8 @@ def main():
try: try:
with open('/etc/yunohost/installed') as f: pass with open('/etc/yunohost/installed') as f: pass
except IOError: except IOError:
raise YunoHostError(17, _("YunoHost is not correctly installed, please execute 'yunohost tools postinstall'")) if sys.argv[1] != 'tools' or sys.argv[2] != 'postinstall':
raise YunoHostError(17, _("YunoHost is not correctly installed, please execute 'yunohost tools postinstall'"))
args = parse_dict(action_map) args = parse_dict(action_map)
args_dict = vars(args).copy() args_dict = vars(args).copy()