summaryrefslogtreecommitdiffstats
path: root/cmd-source-file.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-24 16:27:03 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-24 16:27:03 +0000
commit35b926c4459df017cd9b08611a1b8e11e0eb425f (patch)
tree01a77a07d12b41c47bfb7082a54d4d9279c9f27a /cmd-source-file.c
parent2e2e762743417ae7a0c32a4b40909ecdf3bb3560 (diff)
Sync OpenBSD patchset 290:
When using source-file, run the commands in the context of the source-file command rather than with no context. This makes things like attach work from a file.
Diffstat (limited to 'cmd-source-file.c')
-rw-r--r--cmd-source-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-source-file.c b/cmd-source-file.c
index abb6a66e..ef61cd7f 100644
--- a/cmd-source-file.c
+++ b/cmd-source-file.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-source-file.c,v 1.7 2009-07-28 22:12:16 tcunha Exp $ */
+/* $Id: cmd-source-file.c,v 1.8 2009-08-24 16:27:03 tcunha Exp $ */
/*
* Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org>
@@ -90,7 +90,7 @@ cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx)
struct cmd_source_file_data *data = self->data;
char *cause;
- if (load_cfg(data->path, &cause) != 0) {
+ if (load_cfg(data->path, ctx, &cause) != 0) {
ctx->error(ctx, "%s", cause);
xfree(cause);
return (-1);