summaryrefslogtreecommitdiffstats
path: root/polyp/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/main.c')
-rw-r--r--polyp/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/polyp/main.c b/polyp/main.c
index 9de69ca6..04bcceef 100644
--- a/polyp/main.c
+++ b/polyp/main.c
@@ -234,8 +234,10 @@ int main(int argc, char *argv[]) {
buf = pa_strbuf_new();
assert(buf);
if (conf->default_script_file)
- pa_cli_command_execute_file(c, conf->default_script_file, buf, &conf->fail, &conf->verbose);
- r = pa_cli_command_execute(c, conf->script_commands, buf, &conf->fail, &conf->verbose);
+ r = pa_cli_command_execute_file(c, conf->default_script_file, buf, &conf->fail, &conf->verbose);
+
+ if (r >= 0)
+ r = pa_cli_command_execute(c, conf->script_commands, buf, &conf->fail, &conf->verbose);
pa_log(s = pa_strbuf_tostring_free(buf));
pa_xfree(s);