mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
fix(plugin): inherit_stdout and inherit_stderr in Wasm plugins (#2273)
This commit is contained in:
@@ -152,6 +152,9 @@ impl WasmPlugin {
|
||||
|
||||
let mut builder = WasiCtxBuilder::new();
|
||||
|
||||
builder.inherit_stdout();
|
||||
builder.inherit_stderr();
|
||||
|
||||
let metadata = context.get_metadata();
|
||||
let blocked_permissions = &context.server.advanced_config.plugins.blocked_permissions;
|
||||
|
||||
|
||||
@@ -83,7 +83,10 @@ impl PluginHostState {
|
||||
pub fn new() -> Self {
|
||||
let resource_table = ResourceTable::new();
|
||||
Self {
|
||||
wasi_ctx: WasiCtxBuilder::new().build(),
|
||||
wasi_ctx: WasiCtxBuilder::new()
|
||||
.inherit_stdout() // allow messages & errors to be printed
|
||||
.inherit_stderr() // before `on_load`, e.g. during metadata retrieval
|
||||
.build(),
|
||||
wasi_http_ctx: WasiHttpCtx::new(),
|
||||
wasi_http_hooks: PluginHttpHooks::new(),
|
||||
resource_table,
|
||||
|
||||
Reference in New Issue
Block a user