#Default value for *dagger.Socket
1 messages · Page 1 of 1 (latest)
hi, yes it's possible as well as specifying other things as well. User defaults is what you're looking for (https://github.com/dagger/dagger/pull/11034). Our apologies it's not properly documented yet 🙏
Thanks @hasty umbra . is there any plan for supporting the env:// format for anything else than the secrets ?
hey Julien! you mean passing env values as regular strings into your function via user-defaults?
yeah ideally i want my default to be whatever my host env value is
BUILD_SSHSOCKET=env://SSH_AUTH_SOCK
it would be cleaner than dumping the plain value. this way if this ever changes i dont have to change my user defaults .env file
I see.. do you mind opening an issue? Mostly want to make sure that enabling something like this for sockets won't open the door to something that shouldn't be allowed 🙏
sure ! socket is just one example but any other type could benefit from it
here we go @hasty umbra
https://github.com/dagger/dagger/issues/11581
I've been experimenting with .env files recently and found the following does seem to expand as expected in v0.19.8
BUILD_SSHSOCKET="unix:$SSH_AUTH_SOCK"
nice! seems like it's alerady working. I didn't see that in the PR description so I assumed it wasn't working yet
confirming this works on 0.19.8 (wasn't working on 0.19.7 )
yep. Here's the PR: https://github.com/dagger/dagger/pull/11442
i'll close the GH issue ! i should've updated before raising 