diff options
author | Haru <haru@dotalux.com> | 2016-07-07 19:13:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-07 19:13:53 +0200 |
commit | a088c365019a92251c7163a2379cfcdce8bedd12 (patch) | |
tree | 2050e1093e460a80e88102bb41cd8c4653e9f84e | |
parent | 6437c36105b8c107b178a914961485833c68032b (diff) | |
parent | a179b1d8b8ae8c57d4bac2f04791075b96fa5fd3 (diff) | |
download | hercules-a088c365019a92251c7163a2379cfcdce8bedd12.tar.gz hercules-a088c365019a92251c7163a2379cfcdce8bedd12.tar.bz2 hercules-a088c365019a92251c7163a2379cfcdce8bedd12.tar.xz hercules-a088c365019a92251c7163a2379cfcdce8bedd12.zip |
Merge pull request #1343 from 4144/rootfix
Dont show compilation warnings about root if building for ci.
-rw-r--r-- | src/common/core.c | 6 |
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" |