#Export,Stdout,WithNewFile? What is the best & simplest way to get a result as a file on the host?
1 messages · Page 1 of 1 (latest)
👋 Hi @fallen gale! That really depends on the use case. Either way, dagger cannot programmatically export files, directories, etc. without appending the export --path=<place> to your dagger call command.
As an example in this module (https://github.com/jasonmccallister/dagger-composer/blob/main/main.go#L56), I'm returning a directory of PHP dependencies. I can call this function and export to the host filesystem:
dagger call -m github.com/jasonmccallister/dagger-composer install export --path vendor
The -m github.com/jasonmccallister/dagger-composer would not be required if I added this as a dependency to my current module using dagger install.
thank you for your help !
so we can read files/directories in our code, but we can't write anything / the user must explicitly use export in args ?