Fix logic to disable server default plugins loading #953
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
#281 introduced the new default behavior of loading server plugins from a configuration file. After the discussion in #281 (comment), if
IGN_GAZEBO_SERVER_CONFIG
is set but empty, no server plugins should loaded and theserver.config
file should be ignored.I'm testing this functionality and it seems not working correctly. In fact, the return value of
ignition::common::env
complies with the intended logic only in the variant that accepts the_allowEmpty=true
argument, which was missing.To provide extra downstream content, I'm experimenting loading plugins with the new method introduced in #936. I'm trying to implement robotology-legacy/gym-ignition#378, but as soon as I removed the only plugin that I was loading, the server automatically reverted to the default list of plugins part of
server.config
. This was already known, as ticketed in robotology-legacy/gym-ignition#289.cc @mjcarroll
Note: accordingly to the documentation, this logic will not likely work in Windows due to the its behavior with empty environment variables.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge