Merge pull request #18 from mzihlmann/warn-about-cache-misses
RUN commands dont specify which files were added
This commit is contained in:
commit
2d14b6a277
|
|
@ -437,7 +437,8 @@ func (s *stageBuilder) build() error {
|
||||||
// Raise Warnings for commands that are uncacheable
|
// Raise Warnings for commands that are uncacheable
|
||||||
switch command.(type) {
|
switch command.(type) {
|
||||||
case *commands.RunCommand:
|
case *commands.RunCommand:
|
||||||
if len(files) == 0 {
|
fi, err := os.Stat(tarPath)
|
||||||
|
if err == nil && fi.Size() <= emptyTarSize {
|
||||||
logrus.Warn("cache-violation: RUN created an empty layer, this will cause a diff when rebuilding from cache for the first time.")
|
logrus.Warn("cache-violation: RUN created an empty layer, this will cause a diff when rebuilding from cache for the first time.")
|
||||||
}
|
}
|
||||||
case *commands.WorkdirCommand:
|
case *commands.WorkdirCommand:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue