#Best workaround to emulate mutation of arbitrary files in a directory currently?

1 messages · Page 1 of 1 (latest)

obsidian notch
#

Basically the issue described in https://github.com/dagger/dagger/issues/8235.
E.g. I want to run a function to update all README.md files under a certain dir. I'm not really sure what's the least annoying workaround. All I can think of is having a function for handling a single file, wrapped in a shell script that actually does the call my-func --file <file> ... | export --path <file> in a loop for each README. Or what I maybe like more: call my-func-all --source . | export --path <temp dir + shell script to copy from <temp dir> to actual locations.
Just curious if maybe there's a better way currently?

GitHub

Problem In theory Dagger is perfect for generating code or docs. In practice, the logic for exporting files back to the client filesystem is simplistic and brittle, which makes the experience awkwa...

#

Maybe if there was a way to "diff" two dagger.Directories to just quickly grab changed files that could be useful too
yeah okay this clearly exists ( Directory.Diff() ) 😅