mystikos
mystikos copied to clipboard
Packaged application should fall back to command line parameters in the config file
The current behavior is that when HostApplicationParameters
is true, we ignore the parameters from the config file.
do package -> ls, that uses a config file ls -l ->if config has HostApplicationParameters=1, -l is used from the command line, ignore ApplicationParameters in config.json ls -l -> if config has HostApplicationParameters=0, -l is ignored from command line and use ApplicationParameters in config.json As config is used with packaging mode always, all other Mystikos parameters are pulled from the config file itself, using default parameters is not set in config itself. None-packaged, none signed, if no config is present then all non-specified parameters are same default as if config was present, but command line is allowed to override. config.json present for non-signed, signed and packaged, default config parameters are always used, except for non-signed command line specified.
Are you saying that HostApplicationParameters=1, but also has ApplicationParameters in the config file has some configured but is not used?
If no parameters are specified on the command line, this is STILL a parameter set of no parameters. So we should not automatically fall back to the config.json parameters in this case as it could cause even more confusion.
If HostApplicationParameters=1 AND ApplicationParameters=["blah"], we should (as we currently do) ignore the ApplicationParmaters.
Maybe we should either print a warning, or error out in this case.
Are you saying that HostApplicationParameters=1, but also has ApplicationParameters in the config file has some configured but is not used?
In my case: HostApplicationParameters=1, but also has ApplicationParameters. When I the ran the "myst exec" command without giving parameters, the ApplicationParameters in config.json is ignored.
If HostApplicationParameters=1 AND ApplicationParameters=["blah"], we should (as we currently do) ignore the ApplicationParmaters.
I think we should do the opposite. HostApplicationParameters=1
should just mean the parameters from the host should take precedence. If empty, we should respect the ones from the config file.
HostApplicationParameters=1 -> Always come from command line even if command line argument list is empty. If ApplicationParameters is specified at all when HostApplicationParameters=1 then write a warning to say ignoring the specified ApplicationParameters.