summaryrefslogtreecommitdiff
path: root/src/helper/interpreter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/interpreter.c')
-rw-r--r--src/helper/interpreter.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/helper/interpreter.c b/src/helper/interpreter.c
index 186d992e..8dbb7909 100644
--- a/src/helper/interpreter.c
+++ b/src/helper/interpreter.c
@@ -221,17 +221,7 @@ int handle_script_command(struct command_context_s *cmd_ctx, char *cmd, char **a
if (argc != 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- script_file = open_file_from_path (args[0], "r");
-
- if (!script_file)
- {
- command_print(cmd_ctx, "couldn't open script file %s", args[0]);
- return ERROR_OK;
- }
- command_run_file(cmd_ctx, script_file, cmd_ctx->mode);
-
- fclose(script_file);
-
- return ERROR_OK;
+ /* Run a tcl script file */
+ return command_run_linef(cmd_ctx, "source [find {%s}]", args[0]);
}