KallDrexx
What is the proper way to pass arguments to a dependent application?
I have a library application X that is setup to take in arguments via its start() function, and right now I’m successfully having these set via the mod keyword in mix.exs.
I am now writing another application (Y) that is using application X but it needs the ability to customize the arguments that it starts application X with (including renaming arguments Y has into what X expects.
I can’t find any documentation on how I can have application Y start application X with specific arguments. Applications.start() does not seem to take in arguments.
The only idea I have is having my start function in Y explicitly call X.start(type, args) and add that supervisor as a child to Y’s supervision tree.
Is that the correct way to go or am I missing something more obvious?
Most Liked
marciol
I was wondering the same question when finally I remembered that ExUnit has and very elegant way to handle this same case.







