Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
69f1d0fd
Commit
69f1d0fd
authored
May 24, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
communicator/ssh: Clearer TODO message about acks
parent
3a906903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
communicator/ssh/communicator.go
communicator/ssh/communicator.go
+6
-4
No files found.
communicator/ssh/communicator.go
View file @
69f1d0fd
...
@@ -125,7 +125,10 @@ func (c *comm) Upload(path string, input io.Reader) error {
...
@@ -125,7 +125,10 @@ func (c *comm) Upload(path string, input io.Reader) error {
// Start the protocol
// Start the protocol
fmt
.
Fprintln
(
w
,
"C0644"
,
input_memory
.
Len
(),
target_file
)
fmt
.
Fprintln
(
w
,
"C0644"
,
input_memory
.
Len
(),
target_file
)
io
.
Copy
(
w
,
input_memory
)
io
.
Copy
(
w
,
input_memory
)
fmt
.
Fprint
(
w
,
"
\x00
"
)
// XXX(mitchellh): WHY?
fmt
.
Fprint
(
w
,
"
\x00
"
)
// TODO(mitchellh): Each step above results in a 0/1/2 being sent by
// the remote side to confirm. We should check for those confirmations.
// Close the stdin, which sends an EOF, and then set w to nil so that
// Close the stdin, which sends an EOF, and then set w to nil so that
// our defer func doesn't close it again since that is unsafe with
// our defer func doesn't close it again since that is unsafe with
...
@@ -147,9 +150,8 @@ func (c *comm) Upload(path string, input io.Reader) error {
...
@@ -147,9 +150,8 @@ func (c *comm) Upload(path string, input io.Reader) error {
}
}
// TODO(mitchellh): Check for return data (expect a 0 or error)
log
.
Printf
(
"scp stdout (length %d): %#v"
,
stdout
.
Len
(),
stdout
.
Bytes
())
log
.
Printf
(
"scp stdout: %s"
,
stdout
.
String
())
log
.
Printf
(
"scp stderr (length %d): %s"
,
stderr
.
Len
(),
stderr
.
String
())
log
.
Printf
(
"scp stderr: %s"
,
stderr
.
String
())
return
nil
return
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment