Commit 7f3d3419 authored by Łukasz Matysiak's avatar Łukasz Matysiak
Browse files

Invert if statement

parent 6a1be188
......@@ -1220,7 +1220,11 @@ int Mhwd::launch(int argc, char *argv[])
// Transaction
if (arguments_.INSTALL || arguments_.REMOVE)
{
if (isUserRoot())
if (!isUserRoot())
{
printer_.printError("You cannot perform this operation unless you are root!");
}
else
{
for (auto&& configName = configs_.begin();
configName != configs_.end(); configName++)
......@@ -1296,10 +1300,6 @@ int Mhwd::launch(int argc, char *argv[])
}
}
}
else
{
printer_.printError("You cannot perform this operation unless you are root!");
}
}
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment