Closed artemoz closed 10 months ago
Runtime refuses to start when --cli-file parameter is provided.
--cli-file
To Reproduce Steps to reproduce the behavior:
cli.cfg
sqfvm --cli-file ./cli.cfg
Actual result '"./cli.cfg"' is not allowed inside of the actual file!. error message, sqfvm not running
'"./cli.cfg"' is not allowed inside of the actual file!.
Expected behavior sqfvm running
Additional context I've only tested windows_x64 builds. Does reproduce on the latest development build available in Actions https://github.com/SQFvm/runtime/actions/runs/6331652376 Does reproduce on the latest master build available in Actions https://github.com/SQFvm/runtime/actions/runs/6325629380 Does reproduce on the oldest build ever still available in Actions https://github.com/SQFvm/runtime/actions/runs/5764179067
Does produce the same error message when using the non-existing/broken file/path, e.g. ```
sqfvm-newestdev.exe --cli-file ? '"?"' is not allowed inside of the actual file!.```
Probably caused by https://github.com/SQFvm/runtime/blob/55349de49d1c5ebeae1986cab5092829e5432b3d/src/cli/cli.cpp#L443-L446 setting the m_cli_file variable to true, calling cli_from_file in the next line and https://github.com/SQFvm/runtime/blob/55349de49d1c5ebeae1986cab5092829e5432b3d/src/cli/cli.cpp#L273-L279 erroring out when that same variable is set to true before doing anything else.
m_cli_file
true
cli_from_file
Runtime refuses to start when
--cli-file
parameter is provided.To Reproduce Steps to reproduce the behavior:
cli.cfg
)sqfvm --cli-file ./cli.cfg
Actual result
'"./cli.cfg"' is not allowed inside of the actual file!.
error message, sqfvm not runningExpected behavior sqfvm running
Additional context I've only tested windows_x64 builds. Does reproduce on the latest development build available in Actions https://github.com/SQFvm/runtime/actions/runs/6331652376 Does reproduce on the latest master build available in Actions https://github.com/SQFvm/runtime/actions/runs/6325629380 Does reproduce on the oldest build ever still available in Actions https://github.com/SQFvm/runtime/actions/runs/5764179067
Does produce the same error message when using the non-existing/broken file/path, e.g. ```
Probably caused by https://github.com/SQFvm/runtime/blob/55349de49d1c5ebeae1986cab5092829e5432b3d/src/cli/cli.cpp#L443-L446 setting the
m_cli_file
variable totrue
, callingcli_from_file
in the next line and https://github.com/SQFvm/runtime/blob/55349de49d1c5ebeae1986cab5092829e5432b3d/src/cli/cli.cpp#L273-L279 erroring out when that same variable is set to true before doing anything else.