Add IsVirtual() to compile spec

This commit is contained in:
Ettore Di Giacinto
2021-02-09 19:05:16 +01:00
parent 4d9297e3da
commit 518fb16067
4 changed files with 37 additions and 7 deletions

View File

@@ -522,9 +522,9 @@ func (cs *LuetCompiler) compileWithImage(image, buildertaggedImage, packageImage
p CompilationSpec, generateArtifact bool) (Artifact, error) {
// If it is a virtual, check if we have to generate an empty artifact or not.
if generateArtifact && p.EmptyPackage() && !p.HasImageSource() {
if generateArtifact && p.IsVirtual() {
return cs.genArtifact(p, CompilerBackendOptions{}, CompilerBackendOptions{}, concurrency, keepPermissions)
} else if p.EmptyPackage() && !p.HasImageSource() {
} else if p.IsVirtual() {
return &PackageArtifact{}, nil
}