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
550d350a
Commit
550d350a
authored
Sep 12, 2017
by
Sharno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding output for the created repos when `helm init`
parent
33ad8ca5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
init.go
cmd/helm/init.go
+6
-4
No files found.
cmd/helm/init.go
View file @
550d350a
...
...
@@ -295,11 +295,11 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
if
fi
,
err
:=
os
.
Stat
(
repoFile
);
err
!=
nil
{
fmt
.
Fprintf
(
out
,
"Creating %s
\n
"
,
repoFile
)
f
:=
repo
.
NewRepoFile
()
sr
,
err
:=
initStableRepo
(
home
.
CacheIndex
(
stableRepository
),
skipRefresh
)
sr
,
err
:=
initStableRepo
(
home
.
CacheIndex
(
stableRepository
),
out
,
skipRefresh
)
if
err
!=
nil
{
return
err
}
lr
,
err
:=
initLocalRepo
(
home
.
LocalRepository
(
localRepositoryIndexFile
),
home
.
CacheIndex
(
"local"
))
lr
,
err
:=
initLocalRepo
(
home
.
LocalRepository
(
localRepositoryIndexFile
),
home
.
CacheIndex
(
"local"
)
,
out
)
if
err
!=
nil
{
return
err
}
...
...
@@ -314,7 +314,8 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
return
nil
}
func
initStableRepo
(
cacheFile
string
,
skipRefresh
bool
)
(
*
repo
.
Entry
,
error
)
{
func
initStableRepo
(
cacheFile
string
,
out
io
.
Writer
,
skipRefresh
bool
)
(
*
repo
.
Entry
,
error
)
{
fmt
.
Fprintf
(
out
,
"Adding %s repo with URL: %s
\n
"
,
stableRepository
,
stableRepositoryURL
)
c
:=
repo
.
Entry
{
Name
:
stableRepository
,
URL
:
stableRepositoryURL
,
...
...
@@ -338,8 +339,9 @@ func initStableRepo(cacheFile string, skipRefresh bool) (*repo.Entry, error) {
return
&
c
,
nil
}
func
initLocalRepo
(
indexFile
,
cacheFile
string
)
(
*
repo
.
Entry
,
error
)
{
func
initLocalRepo
(
indexFile
,
cacheFile
string
,
out
io
.
Writer
)
(
*
repo
.
Entry
,
error
)
{
if
fi
,
err
:=
os
.
Stat
(
indexFile
);
err
!=
nil
{
fmt
.
Fprintf
(
out
,
"Adding %s repo with URL: %s
\n
"
,
localRepository
,
localRepositoryURL
)
i
:=
repo
.
NewIndexFile
()
if
err
:=
i
.
WriteFile
(
indexFile
,
0644
);
err
!=
nil
{
return
nil
,
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