We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to define a custom task.
// custom-backend-task.js import child_process from "node:child_process"; /** * @param { string[] } args * @returns { Promise<number> } */ export async function spawn(args) { const child = child_process.spawn(args[0], args.splice(1)); child.on("error", (err) => { console.log("Error", err); }); console.log("Pid:", child.pid); return child.pid; }
-- Main.elm run = [...] (spawn "socat" [...]) spawn : String -> List String -> BackendTask FatalError Int spawn command args = BackendTask.Custom.run "spawn" (Json.Encode.list Json.Encode.string (command :: args)) Json.Decode.int |> BackendTask.allowFatal
The output is
Pid: 1462229 BackendTask.Custom.run "spawn": 2.992ms -- HTTP ERROR --------------- BadBody: INTERNAL ERROR - expected requestelm-pages-internal://port
I can see socat running, and I don't know what is wrong that causes the internal error.
socat
The text was updated successfully, but these errors were encountered:
The issue is the splice(1) which mutates args and causes the request to change hash and not be matched when returning.
splice(1)
args
Sorry, something went wrong.
No branches or pull requests
I'm trying to define a custom task.
The output is
I can see
socat
running, and I don't know what is wrong that causes the internal error.The text was updated successfully, but these errors were encountered: