Access to environment variables inside application

Hey its me again :wink: ,

I would like to know if we can use customized environment variables in the yaml files? I created a builder script where auto create the snaps and move them to a local place for sending.

My question is, we are working in a team so and the source stuff is located on each home directory from the users, so I need to hardcode each path to the sources, or can make I do this like in yaml files like “$PathToSource”/src and so on.

Greets

Hardcoding paths to source code inside a user’s home directory inside a snap doesn’t sound like a good idea in general.

That said, you can certainly look into environment variables inside snap applications. If the user has a given environment variable set while running the application, that will be visible to that application.