Skip to content
New issue

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

Installation should stop when exiting the launcher #509

Closed
chilijung opened this issue Jul 12, 2024 · 6 comments
Closed

Installation should stop when exiting the launcher #509

chilijung opened this issue Jul 12, 2024 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest launcher

Comments

@chilijung
Copy link
Member

Describe the bug
as title

To Reproduce
Steps to reproduce the behavior:

  1. start launcher
  2. when selecting openai or others
  3. hit ctrl + c to exit
  4. it continues to install

Expected behavior
should exit the command

Screenshots
image

@chilijung chilijung added the bug Something isn't working label Jul 12, 2024
@cyyeh cyyeh added the launcher label Jul 12, 2024
@Prototype4988
Copy link
Contributor

Hi Team, I would like to look into this issue. Could you assign it to me

@chilijung
Copy link
Member Author

@Prototype4988 Here you go!

@Prototype4988
Copy link
Contributor

Hi Team, I have done the fix attaching the screenshot from console below

image

@Prototype4988
Copy link
Contributor

Prototype4988 commented Oct 5, 2024

I have added the below code snippet in Launch() function

`done := make(chan os.Signal, 1)

signal.Notify(done, os.Interrupt)

// Fire off a goroutine to loop until that channel receives a signal.
// When a signal is received simply exit the program
go func() {
    for _ = range done {
        os.Exit(0)
    }
}()`

@Prototype4988
Copy link
Contributor

Let me know what you think of this approach

@chilijung
Copy link
Member Author

PR is merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest launcher
Projects
None yet
Development

No branches or pull requests

4 participants