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
e8b7c100
Commit
e8b7c100
authored
9 years ago
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2169 from cbednarski/b-communicator-test-failure
Prevent select from spewing garbage to the terminal
parents
3a066d53
408250ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
packer/communicator.go
packer/communicator.go
+8
-3
No files found.
packer/communicator.go
View file @
e8b7c100
package
packer
package
packer
import
(
import
(
"github.com/mitchellh/iochan"
"io"
"io"
"os"
"os"
"strings"
"strings"
"sync"
"sync"
"github.com/mitchellh/iochan"
)
)
// RemoteCmd represents a remote command being prepared or run.
// RemoteCmd represents a remote command being prepared or run.
...
@@ -132,9 +133,13 @@ OutputLoop:
...
@@ -132,9 +133,13 @@ OutputLoop:
for
{
for
{
select
{
select
{
case
output
:=
<-
stderrCh
:
case
output
:=
<-
stderrCh
:
if
output
!=
""
{
ui
.
Message
(
r
.
cleanOutputLine
(
output
))
ui
.
Message
(
r
.
cleanOutputLine
(
output
))
}
case
output
:=
<-
stdoutCh
:
case
output
:=
<-
stdoutCh
:
if
output
!=
""
{
ui
.
Message
(
r
.
cleanOutputLine
(
output
))
ui
.
Message
(
r
.
cleanOutputLine
(
output
))
}
case
<-
exitCh
:
case
<-
exitCh
:
break
OutputLoop
break
OutputLoop
}
}
...
...
This diff is collapsed.
Click to expand it.
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