Skip to content

Commit

Permalink
fix code-runner environ pass issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Aug 28, 2024
1 parent 0d90106 commit da04956
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/util/code-runner.vala
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,21 @@ private static void code_runner_plugin_init(){
code_runner_plugin script = new code_runner_plugin();
script.name = plugin;
script.init.connect((image, directory)=>{
save_env();
clear_env();
setenv("IMAGE", image, 1);
setenv("DIRECTORY", directory, 1);
setenv("ACTION", "init", 1);
run("%s/%s".printf(plugin_directory ,plugin));
restore_env();


});
script.run.connect((command)=>{
save_env();
clear_env();
setenv("COMMAND", command, 1);
setenv("ACTION", "run", 1);
int status = run("%s/%s".printf(plugin_directory, plugin));
restore_env();
return status;
});
script.clean.connect(()=>{
save_env();
clear_env();
setenv("ACTION", "clean", 1);
run("%s/%s".printf(plugin_directory, plugin));
restore_env();
});
add_code_runner_plugin(script);
}
Expand Down

0 comments on commit da04956

Please sign in to comment.