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

Why status.Stdout is empty in my code #58

Open
wejoy opened this issue Jan 26, 2021 · 2 comments
Open

Why status.Stdout is empty in my code #58

wejoy opened this issue Jan 26, 2021 · 2 comments

Comments

@wejoy
Copy link

wejoy commented Jan 26, 2021

func main() {
	findCmd := cmd.NewCmd("dir")
	statusChan := findCmd.Start()
	go func() {
		for {
			fmt.Println("-------")
			status := findCmd.Status()
			fmt.Println(status.Stdout)
		}
	}()
	<-statusChan
	fmt.Println("=======")
}

I run this program on Win10, and get something like that:

-------
[]
-------
[]
-------
[]
-------
[]
-------
[]
-------
[]
-------
[]

So, what's the problem of it.

@wejoy
Copy link
Author

wejoy commented Jan 26, 2021

OK, I find the problem, command "dir" is not work, but "go env" get outputs, I haven't watched or tested inner code, but I think it maybe is a problem.

@0xRoM
Copy link

0xRoM commented Oct 3, 2021

also cant get dir to work, guessing module is a bit borked?

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

2 participants