Returning custom Exit Code from Iced application #1857
mayankjoshii
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a UI application written in iced, which performs various operation. To launch the UI I'm using run() method:
UpdateDriver::run(Settings::default())
and currently this returns the exit code of typeiced::Result
, but I want the application to return custom exit code of typeu8
based on the operation performed. Ex: 1(success), 2(failure), 3(reboot) etc.I need help on how to do that.
Current WorkFlow
Expectation:
Main Function:
My application runs in both CLI and UI mode, form CLI mode I'm directly returning the
u8
type exit code, need to implement that for UI mode too.So if something like this is not possible, what is the other way to return the exit-code from the UI. Should I add the global variable to store the exit code in UI part of code? Will it be safe?
Beta Was this translation helpful? Give feedback.
All reactions