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
dc7e4657
Commit
dc7e4657
authored
Mar 01, 2018
by
Christopher A. Stelma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass home down through createLink
parent
81e09ff1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
init.go
cmd/helm/init.go
+5
-3
init_unix.go
cmd/helm/init_unix.go
+4
-2
init_windows.go
cmd/helm/init_windows.go
+4
-2
No files found.
cmd/helm/init.go
View file @
dc7e4657
...
@@ -366,7 +366,7 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
...
@@ -366,7 +366,7 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
lr
,
err
:=
initLocalRepo
(
home
.
LocalRepository
(
localRepositoryIndexFile
),
home
.
CacheIndex
(
"local"
),
out
)
lr
,
err
:=
initLocalRepo
(
home
.
LocalRepository
(
localRepositoryIndexFile
),
home
.
CacheIndex
(
"local"
),
out
,
home
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -406,7 +406,7 @@ func initStableRepo(cacheFile string, out io.Writer, skipRefresh bool, home helm
...
@@ -406,7 +406,7 @@ func initStableRepo(cacheFile string, out io.Writer, skipRefresh bool, home helm
return
&
c
,
nil
return
&
c
,
nil
}
}
func
initLocalRepo
(
indexFile
,
cacheFile
string
,
out
io
.
Writer
)
(
*
repo
.
Entry
,
error
)
{
func
initLocalRepo
(
indexFile
,
cacheFile
string
,
out
io
.
Writer
,
home
helmpath
.
Home
)
(
*
repo
.
Entry
,
error
)
{
if
fi
,
err
:=
os
.
Stat
(
indexFile
);
err
!=
nil
{
if
fi
,
err
:=
os
.
Stat
(
indexFile
);
err
!=
nil
{
fmt
.
Fprintf
(
out
,
"Adding %s repo with URL: %s
\n
"
,
localRepository
,
localRepositoryURL
)
fmt
.
Fprintf
(
out
,
"Adding %s repo with URL: %s
\n
"
,
localRepository
,
localRepositoryURL
)
i
:=
repo
.
NewIndexFile
()
i
:=
repo
.
NewIndexFile
()
...
@@ -415,7 +415,9 @@ func initLocalRepo(indexFile, cacheFile string, out io.Writer) (*repo.Entry, err
...
@@ -415,7 +415,9 @@ func initLocalRepo(indexFile, cacheFile string, out io.Writer) (*repo.Entry, err
}
}
//TODO: take this out and replace with helm update functionality
//TODO: take this out and replace with helm update functionality
createLink
(
indexFile
,
cacheFile
)
if
err
:=
createLink
(
indexFile
,
cacheFile
,
home
);
err
!=
nil
{
return
nil
,
err
}
}
else
if
fi
.
IsDir
()
{
}
else
if
fi
.
IsDir
()
{
return
nil
,
fmt
.
Errorf
(
"%s must be a file, not a directory"
,
indexFile
)
return
nil
,
fmt
.
Errorf
(
"%s must be a file, not a directory"
,
indexFile
)
}
}
...
...
cmd/helm/init_unix.go
View file @
dc7e4657
...
@@ -20,8 +20,10 @@ package main
...
@@ -20,8 +20,10 @@ package main
import
(
import
(
"os"
"os"
"k8s.io/helm/pkg/helm/helmpath"
)
)
func
createLink
(
indexFile
,
cacheFile
string
)
{
func
createLink
(
indexFile
,
cacheFile
string
,
home
helmpath
.
Home
)
error
{
os
.
Symlink
(
indexFile
,
cacheFile
)
return
os
.
Symlink
(
indexFile
,
cacheFile
)
}
}
cmd/helm/init_windows.go
View file @
dc7e4657
...
@@ -20,8 +20,10 @@ package main
...
@@ -20,8 +20,10 @@ package main
import
(
import
(
"os"
"os"
"k8s.io/helm/pkg/helm/helmpath"
)
)
func
createLink
(
indexFile
,
cacheFile
string
)
{
func
createLink
(
indexFile
,
cacheFile
string
,
home
helmpath
.
Home
)
error
{
os
.
Link
(
indexFile
,
cacheFile
)
return
os
.
Link
(
indexFile
,
cacheFile
)
}
}
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