Fix permissions issue and doc generation issue
Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
This commit is contained in:
parent
5de86cb1ee
commit
6f5095ec19
@ -338,7 +338,9 @@ func walkStdlib(ctx context.Context, output, format string) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if p == "." || d.Name() == pkg.AlphaModule || !d.IsDir() || d.Name() == "cue.mod" {
|
// Ignore useless embedded files
|
||||||
|
if p == "." || d.Name() == pkg.AlphaModule || !d.IsDir() || d.Name() == "cue.mod" ||
|
||||||
|
strings.Contains(p, "cue.mod") || strings.Contains(p, "tests") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,6 +359,10 @@ func walkStdlib(ctx context.Context, output, format string) {
|
|||||||
lg.Warn().Str("package", p).Err(err).Msg("ignoring")
|
lg.Warn().Str("package", p).Err(err).Msg("ignoring")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if strings.Contains(err.Error(), "cannot find package") {
|
||||||
|
lg.Warn().Str("package", p).Err(err).Msg("ignoring")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,11 +133,10 @@ func extractModules(dest string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
info, err := fs.Stat(FS, p)
|
// Give exec permission on embedded file to freely use shell script
|
||||||
if err != nil {
|
// Exclude permission linter
|
||||||
return err
|
//nolint
|
||||||
}
|
return os.WriteFile(overlayPath, contents, 0700)
|
||||||
return os.WriteFile(overlayPath, contents, info.Mode().Perm())
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user