links
links copied to clipboard
Default config entries shadow CLI arguments
Port number supplied via --set flag does not seem to override the port given in the default config file.
Suppose you have the following config in the default config file $OPAM_SWITCH_PREFIX/etc/links/config which specifies the port:
port=8081
You then run some Links server with a flag to specify a different port like so:
links example.links --set=port=8082
The server runs in 8081 in the config file, and not 8082 in the flag.
We should delete the port= entry from the default configuration file as the default value for the setting port is 8080.
The default config does not specify the port
$ cat $OPAM_SWITCH_PREFIX/etc/links/config
jsliburl=/lib/js
jslibdir=/home/dhil/.opam/4.11.2/lib/links/js
stdlib_path=/home/dhil/.opam/4.11.2/lib/links/stdlib
#database_driver=postgresql
#database_args=localhost:5432:user:pass
I agree there is an issue with the default config entries shadowing whatever options have been supplied on the commandline. However, the particular instance you describe here with port can only occur if you have manually modified the default config.
Yeah, I'm referring to the case where the default config is modified.