Skip to content

Commit

Permalink
fix(action): switch from WithMountedDirectory to WithDirectory
Browse files Browse the repository at this point in the history
- WithMountedDirectory has problems when nested
- since working directory in container is already mounted with
  WithMountedDirectory, the subsequent mounts would silently fail
  resulting only in empty directories
  • Loading branch information
AtomicFS committed Nov 1, 2023
1 parent a0df249 commit 8b26361
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion action/recipes/coreboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"errors"
"fmt"
"log"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -179,8 +180,13 @@ func coreboot(ctx context.Context, client *dagger.Client, common *commonOpts, do
}
if opts.blobs[blob].isDirectory {
// Directory
log.Printf("Copying directory '%s' to container at '%s'", src, dst)
myContainer = myContainer.WithExec([]string{"mkdir", "-p", dst})
myContainer = myContainer.WithMountedDirectory(
// myContainer = myContainer.WithMountedDirectory(
// can't use WithMountedDirectory because the repo (aka working directory)
// is already mounted with WithMountedDirectory
// this nesting causes problems
myContainer = myContainer.WithDirectory(
dst,
client.Host().Directory(src),
)
Expand Down

0 comments on commit 8b26361

Please sign in to comment.