setUseArtifactsFrom only when flag is set

This commit is contained in:
yiscah
2022-01-18 16:32:01 +02:00
parent 61ce00108e
commit d91304f9ad
+3
View File
@@ -89,6 +89,9 @@ func (scanInfo *ScanInfo) Init() {
}
func (scanInfo *ScanInfo) setUseArtifactsFrom() {
if scanInfo.UseArtifactsFrom == "" {
return
}
// UseArtifactsFrom must be a path without a filename
dir, file := filepath.Split(scanInfo.UseArtifactsFrom)
if dir == "" {