Can't use custom func as output
See original GitHub issueTrying to use a custom function in Output I am getting the following exception:
System.Exception: Cannot convert output type.
at Fli.CE.ICommandContext`1.outputTypeMapping[a,a](ICommandContext`1 _, a output)
at Fli.CE.ICommandContext`1.Output[a,a](ICommandContext`1 this, ICommandContext`1 context, a output)
My command:
let! output =
cli {
Shell BASH
Command (opts.Value.Path)
WorkingDirectory(opts.Value.WorkingDir)
Output (Custom(Func<string,unit>(fun s -> ctx.GetLogger().LogInformation("log: {Message}", s) )
))
}
|> Command.executeAsync
|> Async.StartAsTask
Issue Analytics
- State:
- Created 4 months ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Handle and return errors from your custom function
If something goes wrong while your custom function runs, return an error to inform the user. If you have specific parameter requirements, such ......
Read more >Why is Excel User Defined Function not working?
Sometimes a new module is not created, and the custom function code ends up in the wrong place, such as the code area...
Read more >Custom function not returning any output
I'm trying to write a custom function but it isn't returning any output. Here's my code so far: Options[Alternate] = {AlternationType ...
Read more >Applying a custom function to a data.table doesn't work, ...
tl,dr: My function seems to work, but then I lapply it and it doesn't. Is it the function or the lapplying? The data....
Read more >Bug - Custom Function with Texture2D not working
Hi All, I'm trying to create a Custom Function Node with Texture2Ds. However, even the simplest function won't compile.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks!
@queil Thanks for sharing. I was pretty sure that CustomOperations can’t share the same name, but I was wrong. This change comes in the next version + I amended some docs about this.