icehck return of os.MkDir what fixes linting

This commit is contained in:
Christian Goll
2021-09-10 08:52:45 +02:00
parent f89293a1d6
commit 16387258cd

View File

@@ -79,8 +79,12 @@ func Build(kernelVersion string, root string) (string, error) {
driversDestination := KmodsImage(kernelVersion)
// Create the destination paths just in case it doesn't exist
os.MkdirAll(path.Dir(kernelDestination), 0755)
os.MkdirAll(path.Dir(driversDestination), 0755)
if err := os.MkdirAll(path.Dir(kernelDestination), 0755) ; err != nil {
return "", err
}
if err := os.MkdirAll(path.Dir(driversDestination), 0755) ; err != nil {
return "", err
}
if !util.IsFile(kernelImage) {
// allow uncompressed kernels (can be handy for aarch64)