func (c *Cmd) Run() error {
	if err := c.Start(); err != nil {
		return err
	}
	err := c.Wait()
	if exitError, ok := err.(*exec.ExitError); ok && exitError != nil {
		status := exitError.ProcessState.Sys().(syscall.WaitStatus)
		if status.Exited() {
			return cmd.NewRcPassthroughError(status.ExitStatus())
		}
	}
	return err
}
// Run runs the command, and returns the result as an error.
Run runs the command, and returns the result as an error.
// Run runs the command and returns the result as an error .
func (c *Cmd) Run() error {
	if err := c.Start(); err != nil {
		return err
	}
	err := c.Wait()
	if exitError, ok := err.(*exec.ExitError); ok && exitError != nil {
		status := exitError.ProcessState.Sys().(syscall.WaitStatus)
		if status.Exited() {
			return cmd.NewRcPassthroughError(status.ExitStatus())
		}
	}
	return err
}
func ( c * Cmd ) Run ( ) error { if err := c . Start ( ) ; err != nil { return err } err := c . Wait ( ) if exitError , ok := err . ( * exec . ExitError ) ; ok && exitError != nil { status := exitError . ProcessState . Sys ( ) . ( syscall . WaitStatus ) if status . Exited ( ) { return cmd . NewRcPassthroughError ( status . ExitStatus ( ) ) } } return err }
Run runs the command, and returns the result as an error.
Run runs the command and returns the result as an error .