-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: read fpmrc from a custom path #1902
Comments
I like the idea. A similar idea was proposed in #1172, so you're not alone in wanting this :) I haven't thought about this in a while, but it should be doable. There's some implementation complexity like how to report circular references, for example an fpmrc that includes itself. |
Should the fpmrc flag processes the flags immediately or afterwards? Example, if |
I did some exploration to see how hard this might be to implement, and I'm not sure it could be easily done with a flag. The reason is that fpm uses a library called Clamp to do command-line argument processing, and Clamp doesn't seem to support something like this. Basically, I was looking for something in Clamp that would let me, during option/argument processing, to add more options to process. I couldn't find any. The code that might let me is pretty deep within Clamp and doesn't expose the methods to even let me try it. The current Lines 524 to 578 in 7881705
Basically, when you run
We have a kind of chicken and egg problem that only Clamp really knows how to process fpm's command line flag, and fpm doesn't have the kind of control that would allow I'm still trying to think of a way to add this feature as a command line flag... |
inline arguments should always have a higher priority. the order that i've generally seen in practice has been:
|
I have one solution that might work. FPM supports an environment variable "FPMOPTS" where it will use the contents of this variable as flags.
In #1827 I proposed maybe using a file for your config and using
|
Noting for future: I may have found a way to do this with a flag. I made a small demo to see if the idea works, and I think it'll work! I don't know when it'll be implemented in fpm, but at least I feel like it's possible to have a flag like |
Draft in progress! #1905 |
Fixed, I hope, by #1905 which adds |
fpm 1.15.0 released with this new |
Currently, the location of
.fpm
rc files are hardcoded to$CWD/.fpm
and$HOME/.fpm
. For some of my CI pipelines, the file is actually mounted to/var/secrets/<random-name>
by the builder.This leads to having to add a new step which copies over the secrets to local-dir before fpm can be launched.
Please add a custom command-line flag such that this path can be provided manually, something like:
fpm --config-file /var/secrets/10f51d93-b39a-4e0c-aa9f-f6393b03bcf1 # OR fpm --fpmrc-file /var/secrets/10f51d93-b39a-4e0c-aa9f-f6393b03bcf1
The text was updated successfully, but these errors were encountered: