mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 05:54:47 +02:00
Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode displaying them.
This commit is contained in:
@ -89,12 +89,18 @@ int
|
||||
cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
{
|
||||
struct cmd_source_file_data *data = self->data;
|
||||
char *cause;
|
||||
char **causes;
|
||||
u_int i, ncauses;
|
||||
|
||||
if (load_cfg(data->path, ctx, &cause) != 0) {
|
||||
ctx->error(ctx, "%s", cause);
|
||||
xfree(cause);
|
||||
return (-1);
|
||||
causes = NULL;
|
||||
ncauses = 0;
|
||||
|
||||
if (load_cfg(data->path, ctx, &ncauses, &causes) != 0) {
|
||||
for (i = 0; i < ncauses; i++) {
|
||||
ctx->print(ctx, "%s", causes[i]);
|
||||
xfree(causes[i]);
|
||||
}
|
||||
xfree(causes);
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
Reference in New Issue
Block a user