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
911dc0a0
Commit
911dc0a0
authored
Mar 22, 2016
by
Michelle Noorali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ref(repo:) handle zero chart repos gracefully
parent
179f5216
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
repository.go
cmd/helm/repository.go
+11
-17
No files found.
cmd/helm/repository.go
View file @
911dc0a0
...
...
@@ -38,19 +38,8 @@ func repoCommands() cli.Command {
{
Name
:
"add"
,
Usage
:
"Add a repository to the remote manager."
,
ArgsUsage
:
"REPOSITORY"
,
Flags
:
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"cred"
,
Usage
:
"The name of the credential."
,
},
},
Action
:
func
(
c
*
cli
.
Context
)
{
run
(
c
,
addRepo
)
},
},
{
Name
:
"show"
,
Usage
:
"Show the repository details for a given repository."
,
ArgsUsage
:
"REPOSITORY"
,
ArgsUsage
:
"REPOSITORY_URL"
,
Action
:
func
(
c
*
cli
.
Context
)
{
run
(
c
,
addRepo
)
},
},
{
Name
:
"list"
,
...
...
@@ -62,7 +51,7 @@ func repoCommands() cli.Command {
Name
:
"remove"
,
Aliases
:
[]
string
{
"rm"
},
Usage
:
"Remove a repository from the remote manager."
,
ArgsUsage
:
"REPOSITORY"
,
ArgsUsage
:
"REPOSITORY
_URL
"
,
Action
:
func
(
c
*
cli
.
Context
)
{
run
(
c
,
removeRepo
)
},
},
},
...
...
@@ -88,9 +77,14 @@ func listRepos(c *cli.Context) error {
if
_
,
err
:=
NewClient
(
c
)
.
Get
(
chartRepoPath
,
&
dest
);
err
!=
nil
{
return
err
}
format
.
Msg
(
"Chart Repositories:"
)
for
_
,
r
:=
range
dest
{
format
.
Msg
(
r
.
URL
+
"
\n
"
)
if
len
(
dest
)
<
1
{
format
.
Info
(
"Looks like you don't have any chart repositories."
)
format
.
Info
(
"Add a chart repository using the `helm repo add [REPOSITORY_URL]` command."
)
}
else
{
format
.
Msg
(
"Chart Repositories:
\n
"
)
for
_
,
r
:=
range
dest
{
format
.
Msg
(
r
.
URL
+
"
\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