Skip to content

Commit

Permalink
#341 set HOSTNAME as environment variable for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Jul 11, 2018
1 parent 76edd87 commit 70b0d72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/store/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,12 @@ void corto_environment_init(void)
corto_setenv("BAKE_TARGET", ".");
}

if (!corto_getenv("HOSTNAME")) {
corto_id hostname;
gethostname(hostname, sizeof(hostname));
corto_setenv("HOSTNAME", hostname);
}

corto_string enableBacktrace = corto_getenv("CORTO_LOG_BACKTRACE");
if (enableBacktrace) {
CORTO_LOG_BACKTRACE = !strcmp(enableBacktrace, "true");
Expand Down

0 comments on commit 70b0d72

Please sign in to comment.