Skip to content

Commit

Permalink
パイプラインが動作しなくなっていた不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
hymkor committed Oct 9, 2014
1 parent bdd3735 commit c6964ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions interpreter/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func (this *Interpreter) Clone() *Interpreter {
rv.Stderr = this.Stderr
rv.Stdin = this.Stdin
rv.HookCount = this.HookCount
// Dont Copy 'Closer' and 'IsBackGround'
return this
}

Expand Down Expand Up @@ -63,8 +64,8 @@ func (this *Interpreter) Interpret(text string) (NextT, error) {
for _, pipeline := range statements {
var pipeIn *os.File = nil
for _, state := range pipeline {
//fmt.Println(state)
cmd := this.Clone()
var cmd Interpreter
cmd.HookCount = this.HookCount
if this.Stderr != nil {
cmd.Stdin = this.Stdin
} else {
Expand Down Expand Up @@ -141,7 +142,7 @@ func (this *Interpreter) Interpret(text string) (NextT, error) {
cmd.Args = state.Argv
cmd.IsBackGround = isBackGround
cmd.Closer = pipeOut
whatToDo, err = hook(cmd)
whatToDo, err = hook(&cmd)
if whatToDo == THROUGH {
cmd.Path, err = exec.LookPath(state.Argv[0])
if err == nil {
Expand Down

0 comments on commit c6964ce

Please sign in to comment.