Skip to content

Commit

Permalink
Merge pull request #14 from olcf/development
Browse files Browse the repository at this point in the history
Add failed env variables and cwd to error message
  • Loading branch information
Adam Simpson authored May 24, 2017
2 parents 7763274 + 7e777a9 commit 2f7967d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/split.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void SetSplitCommunicator(const int color) {
static void SetWorkingDirectory(const char *const work_dir) {
const int err = chdir(work_dir);
if(err)
EXIT_PRINT("Failed to change working directory: %s!\n", strerror(errno));
EXIT_PRINT("Failed to change working directory to %s: %s!\n", work_dir, strerror(errno));
}

// Set environment variables in env_vars string
Expand All @@ -119,7 +119,7 @@ static void SetEnvironmentVaribles(char *env_vars) {
if(num_components == 2) {
const int err = setenv(key, value, 1);
if(err)
EXIT_PRINT("Error setting environment variable: %s\n", strerror(errno));
EXIT_PRINT("Error setting environment variable %s: %s\n", key, strerror(errno));
}
else
EXIT_PRINT("Error parsing environment_variables\n");
Expand Down

0 comments on commit 2f7967d

Please sign in to comment.