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
f3e75479
Commit
f3e75479
authored
Jul 05, 2016
by
Adnan Abdulhussein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(lint): print relative path of packaged chart instead of temp dir
parent
f273510c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lint.go
cmd/helm/lint.go
+6
-3
No files found.
cmd/helm/lint.go
View file @
f3e75479
...
@@ -82,6 +82,7 @@ func lintCmd(cmd *cobra.Command, args []string) error {
...
@@ -82,6 +82,7 @@ func lintCmd(cmd *cobra.Command, args []string) error {
}
}
func
lintChart
(
path
string
)
error
{
func
lintChart
(
path
string
)
error
{
var
chartPath
string
if
strings
.
HasSuffix
(
path
,
".tgz"
)
{
if
strings
.
HasSuffix
(
path
,
".tgz"
)
{
tempDir
,
err
:=
ioutil
.
TempDir
(
""
,
"helm-lint"
)
tempDir
,
err
:=
ioutil
.
TempDir
(
""
,
"helm-lint"
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -100,18 +101,20 @@ func lintChart(path string) error {
...
@@ -100,18 +101,20 @@ func lintChart(path string) error {
}
}
base
:=
strings
.
Split
(
filepath
.
Base
(
path
),
"-"
)[
0
]
base
:=
strings
.
Split
(
filepath
.
Base
(
path
),
"-"
)[
0
]
path
=
filepath
.
Join
(
tempDir
,
base
)
chartPath
=
filepath
.
Join
(
tempDir
,
base
)
}
else
{
chartPath
=
path
}
}
// Guard: Error out of this is not a chart.
// Guard: Error out of this is not a chart.
if
_
,
err
:=
os
.
Stat
(
filepath
.
Join
(
p
ath
,
"Chart.yaml"
));
err
!=
nil
{
if
_
,
err
:=
os
.
Stat
(
filepath
.
Join
(
chartP
ath
,
"Chart.yaml"
));
err
!=
nil
{
fmt
.
Println
(
"==> Skipping"
,
path
)
fmt
.
Println
(
"==> Skipping"
,
path
)
return
errLintNoChart
return
errLintNoChart
}
}
fmt
.
Println
(
"==> Linting"
,
path
)
fmt
.
Println
(
"==> Linting"
,
path
)
linter
:=
lint
.
All
(
p
ath
)
linter
:=
lint
.
All
(
chartP
ath
)
if
len
(
linter
.
Messages
)
==
0
{
if
len
(
linter
.
Messages
)
==
0
{
fmt
.
Println
(
"Lint OK"
)
fmt
.
Println
(
"Lint OK"
)
...
...
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