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

Commands cannot execute. I think the Execute function in SR-G/sleep-on-lan/src/utils_system.go is bugged. #56

Open
aab641 opened this issue Feb 1, 2024 · 0 comments

Comments

@aab641
Copy link

aab641 commented Feb 1, 2024

I think this may work better.

func Execute(command string) (bool, string, error) {
// Use a shell to execute the command
out, err := exec.Command("sh", "-c", command).Output()
if err != nil {
return false, string(out), err
}
return true, string(out), nil
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant