communicator/ssh: detect if SCP exited with failure [GH-386]
This commit is contained in:
parent
9a6309738a
commit
a9bd78a08f
|
@ -23,6 +23,7 @@ IMPROVEMENTS:
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
* core: Detect if SCP is not enabled on the other side. [GH-386]
|
||||||
* builder/amazon/all: When copying AMI to multiple regions, copy
|
* builder/amazon/all: When copying AMI to multiple regions, copy
|
||||||
the metadata (tags and attributes) as well. [GH-388]
|
the metadata (tags and attributes) as well. [GH-388]
|
||||||
* builder/amazon/all: Fix panic case where eventually consistent
|
* builder/amazon/all: Fix panic case where eventually consistent
|
||||||
|
|
|
@ -290,9 +290,11 @@ func (c *comm) scpSession(scpCommand string, f func(io.Writer, *bufio.Reader) er
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call our callback that executes in the context of SCP
|
// Call our callback that executes in the context of SCP. We ignore
|
||||||
|
// EOF errors if they occur because it usually means that SCP prematurely
|
||||||
|
// ended on the other side.
|
||||||
log.Println("Started SCP session, beginning transfers...")
|
log.Println("Started SCP session, beginning transfers...")
|
||||||
if err := f(stdinW, stdoutR); err != nil {
|
if err := f(stdinW, stdoutR); err != nil && err != io.EOF {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue