Repository navigation
feat: resolve config paths relative to the config file - #52
Merged
Merged
Conversation
bhirsz
force-pushed
the
feat/config-relative-paths
branch
3 times, most recently
from
September 30, 2026 20:05
ae6717f to
cf638e4
Compare
bhirsz
force-pushed
the
feat/top-level-config
branch
from
September 30, 2026 20:05
1af1597 to
de3e8c3
Compare
bhirsz
force-pushed
the
feat/config-relative-paths
branch
from
October 8, 2026 09:17
cf638e4 to
b380f95
Compare
bhirsz
force-pushed
the
feat/top-level-config
branch
2 times, most recently
from
October 8, 2026 10:06
44e95c7 to
8588dc8
Compare
Add `relative_to_config` to `option()` and `argument()`. With `True`, relative path strings (or string list items) set in a config file are resolved against the directory of the file that sets them - the discovered/explicit config, each `extends`-ed file and profiles - so a tool behaves the same when run from a subdirectory. With `"existing"`, a value is resolved only when it (or its part before a `:args`/`;args` suffix) exists there, for values that may also be module names. Command-line and environment values are left untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bhirsz
force-pushed
the
feat/config-relative-paths
branch
from
October 8, 2026 10:08
b380f95 to
0b0e91e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
relative_to_configfor options and arguments:True: relative paths set in a config file resolve against the directory of the file that sets them (includingextendsfiles and profiles)."existing": resolve only when the value (or its part before a:args/;argssuffix, Windows drive colons aware) exists there - for values that may be a path or a module name, e.g.listener = ["MyListener", "tools/listener.py:arg"].CLI/env values are unchanged.
Motivation:
paths = ["tests"]/outputdir/ listeners inrobot.tomlshould work whenrobotruns from a subdirectory (robotframework/robotframework#5773).Stacked on #51.