Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9ae46359
Commit
9ae46359
authored
Sep 07, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Sep 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32212 from fraenkel/save_stderr
Automatic merge from submit-queue Save stderr since it may become nil fixes #32206 opts.Run() may set Err to nil
parents
962d51ec
fb4a4663
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
run.go
pkg/kubectl/cmd/run.go
+3
-1
No files found.
pkg/kubectl/cmd/run.go
View file @
9ae46359
...
@@ -478,8 +478,10 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, ns, name string, opts
...
@@ -478,8 +478,10 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, ns, name string, opts
opts
.
Client
=
c
opts
.
Client
=
c
opts
.
PodName
=
name
opts
.
PodName
=
name
opts
.
Namespace
=
ns
opts
.
Namespace
=
ns
// TODO: opts.Run sets opts.Err to nil, we need to find a better way
stderr
:=
opts
.
Err
if
err
:=
opts
.
Run
();
err
!=
nil
{
if
err
:=
opts
.
Run
();
err
!=
nil
{
fmt
.
Fprintf
(
opts
.
E
rr
,
"Error attaching, falling back to logs: %v
\n
"
,
err
)
fmt
.
Fprintf
(
stde
rr
,
"Error attaching, falling back to logs: %v
\n
"
,
err
)
req
,
err
:=
f
.
LogsForObject
(
pod
,
&
api
.
PodLogOptions
{
Container
:
ctrName
})
req
,
err
:=
f
.
LogsForObject
(
pod
,
&
api
.
PodLogOptions
{
Container
:
ctrName
})
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
...
...
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