genbindings/main: create target directory if not already existing

This commit is contained in:
mappu 2024-10-16 18:05:24 +13:00
parent 562590fa96
commit 2434084238

View File

@ -50,6 +50,8 @@ func findHeadersInDir(srcDir string) []string {
func cleanGeneratedFilesInDir(dirpath string) {
log.Printf("Cleaning up output directory %q...", dirpath)
_ = os.MkdirAll(dirpath, 0755)
existing, err := os.ReadDir(dirpath)
if err != nil {
panic(err)