mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-26 00:32:45 +03:00
serde issues fixed in alias
This commit is contained in:
parent
0833489ce7
commit
4ad3dcbbab
@ -2,7 +2,6 @@ use kinode_process_lib::{
|
||||
await_next_request_body, call_init, println, Address, ProcessId, Request,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
|
||||
wit_bindgen::generate!({
|
||||
path: "wit",
|
||||
@ -46,13 +45,11 @@ fn init(_our: Address) {
|
||||
let _ = Request::new()
|
||||
.target(("our", "terminal", "terminal", "sys"))
|
||||
.body(
|
||||
json!(TerminalAction::EditAlias {
|
||||
serde_json::to_vec(&TerminalAction::EditAlias {
|
||||
alias: alias.to_string(),
|
||||
process: None
|
||||
process: None,
|
||||
})
|
||||
.to_string()
|
||||
.as_bytes()
|
||||
.to_vec(),
|
||||
.unwrap(),
|
||||
)
|
||||
.send();
|
||||
} else {
|
||||
@ -61,13 +58,11 @@ fn init(_our: Address) {
|
||||
let _ = Request::new()
|
||||
.target(("our", "terminal", "terminal", "sys"))
|
||||
.body(
|
||||
json!(TerminalAction::EditAlias {
|
||||
serde_json::to_vec(&TerminalAction::EditAlias {
|
||||
alias: alias.to_string(),
|
||||
process: Some(process)
|
||||
process: Some(process),
|
||||
})
|
||||
.to_string()
|
||||
.as_bytes()
|
||||
.to_vec(),
|
||||
.unwrap(),
|
||||
)
|
||||
.send();
|
||||
}
|
||||
|
@ -169,7 +169,8 @@ fn handle_run(
|
||||
pipe: Option<(String, u64)>,
|
||||
) -> anyhow::Result<()> {
|
||||
let wasm_path = format!("{}.wasm", process.process());
|
||||
let drive_path = format!("/{}:{}/pkg", process.package(), process.publisher());
|
||||
let package = format!("{}:{}", process.package(), process.publisher());
|
||||
let drive_path = format!("/{}/pkg", package);
|
||||
let Ok(entry) = get_entry(process) else {
|
||||
return Err(anyhow::anyhow!("script not in scripts.json file"));
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user