summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-07 18:42:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-07 19:03:48 +0300
commita179b1d8b8ae8c57d4bac2f04791075b96fa5fd3 (patch)
tree2050e1093e460a80e88102bb41cd8c4653e9f84e
parent6437c36105b8c107b178a914961485833c68032b (diff)
downloadhercules-a179b1d8b8ae8c57d4bac2f04791075b96fa5fd3.tar.gz
hercules-a179b1d8b8ae8c57d4bac2f04791075b96fa5fd3.tar.bz2
hercules-a179b1d8b8ae8c57d4bac2f04791075b96fa5fd3.tar.xz
hercules-a179b1d8b8ae8c57d4bac2f04791075b96fa5fd3.zip
Dont show compilation warnings about root if building for ci.
And allow run under root in ci.
-rw-r--r--src/common/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 08ed4b71b..e6b522926 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -202,14 +202,20 @@ bool usercheck(void)
#ifndef _WIN32
if (sysinfo->is_superuser()) {
if (!isatty(fileno(stdin))) {
+#ifdef BUILDBOT
+ return true;
+#else // BUILDBOT
ShowFatalError("You are running Hercules with root privileges, it is not necessary, nor recommended. "
"Aborting.\n");
return false; // Don't allow noninteractive execution regardless.
+#endif // BUILDBOT
}
ShowError("You are running Hercules with root privileges, it is not necessary, nor recommended.\n");
#ifdef I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT
+#ifndef BUILDBOT
#warning This Hercules build is not eligible to obtain support by the developers.
#warning The setting I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT is deprecated and should not be used.
+#endif // BUILDBOT
#else // not I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT
ShowNotice("Execution will be paused for 60 seconds. Press Ctrl-C if you wish to quit.\n");
ShowNotice("If you want to get rid of this message, please open %s and uncomment, near the top, the line saying:\n"