mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 08:17:55 +00:00
Support NO_COLOR
environment variable
This commit is contained in:
parent
421e087d81
commit
726224b253
1 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,11 @@
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "stratum_server.h"
|
#include "stratum_server.h"
|
||||||
#include "p2p_server.h"
|
#include "p2p_server.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable : 4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
void p2pool_usage();
|
void p2pool_usage();
|
||||||
|
|
||||||
|
@ -26,6 +31,11 @@ namespace p2pool {
|
||||||
|
|
||||||
Params::Params(int argc, char* argv[])
|
Params::Params(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
const char* no_color = getenv("NO_COLOR");
|
||||||
|
if (no_color && *no_color) {
|
||||||
|
log::CONSOLE_COLORS = false;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 1; i < argc; ++i) {
|
for (int i = 1; i < argc; ++i) {
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue