Skip to content

Commit

Permalink
fix(pkg/build): ensure output folders exist.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Oct 20, 2023
1 parent 45048b5 commit 54fbe79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func buildConfig(client *s3utils.Client, opts Options,
}
}

// Ensure output folder exist; don't check for error, it will fail at next step anyway.
_ = os.MkdirAll(filepath.Dir(driverkitYaml.Output.Module), 0700)

err = driverbuilder.NewDockerBuildProcessor(1000, "").Start(ro.ToBuild())
if err != nil {
if redirectErrorsF != nil {
Expand Down
2 changes: 0 additions & 2 deletions pkg/build/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ func TestBuild(t *testing.T) {
RepoRoot: "./test",
Architecture: "amd64",
}, "5.0.1+driver", "")
err = os.MkdirAll(outputPath, 0700)
assert.NoError(t, err)

// Now, for each test, build the drivers then check s3 bucket objects
for _, test := range tests {
Expand Down

0 comments on commit 54fbe79

Please sign in to comment.