Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
084bbfa2
Commit
084bbfa2
authored
May 09, 2017
by
Sushil Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return error exit-code in case of error
parent
24157e4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
plugin_remove.go
cmd/helm/plugin_remove.go
+7
-3
No files found.
cmd/helm/plugin_remove.go
View file @
084bbfa2
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"io"
"os"
"strings"
"k8s.io/helm/pkg/helm/helmpath"
"k8s.io/helm/pkg/plugin"
...
...
@@ -64,17 +65,20 @@ func (pcmd *pluginRemoveCmd) run() error {
if
err
!=
nil
{
return
err
}
var
errorPlugins
[]
string
for
_
,
name
:=
range
pcmd
.
names
{
if
found
:=
findPlugin
(
plugins
,
name
);
found
!=
nil
{
if
err
:=
removePlugin
(
found
,
pcmd
.
home
);
err
!=
nil
{
fmt
.
Fprintf
(
pcmd
.
out
,
"Failed to remove plugin %s, got error (%v)
\n
"
,
name
,
err
)
errorPlugins
=
append
(
errorPlugins
,
fmt
.
Sprintf
(
"Failed to remove plugin %s, got error (%v)"
,
name
,
err
)
)
}
else
{
fmt
.
Fprintf
(
pcmd
.
out
,
"Removed plugin: %s
\n
"
,
name
)
}
}
else
{
fmt
.
Fprintf
(
pcmd
.
out
,
"Plugin: %s not found
\n
"
,
name
)
errorPlugins
=
append
(
errorPlugins
,
fmt
.
Sprintf
(
"Plugin: %s not found"
,
name
))
}
}
if
len
(
errorPlugins
)
>
0
{
return
fmt
.
Errorf
(
strings
.
Join
(
errorPlugins
,
"
\n
"
))
}
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