Interpret paths in known-model.json
relative to the JSON file
#495
Labels
enhancement
New feature or request
known-model.json
relative to the JSON file
#495
The current behavior of interpreting relative paths in a
known-model.json
file relative to CWD is very unintuitive, and can easily lead to confusion if CWD doesn't match expectations.capellambse.repl
tries to work around that by switching to the project root, so that e.g.python -m capellambse.repl test-6.0
works as expected; however, that introduces the new problem thatcd /some/model; python -m capellambse.repl .
doesn't work anymore.We should adjust the loader behavior so that it interprets paths relative to the location of the JSON file that they came from. If the path didn't come from a JSON file, we should still fall back to using CWD, to still allow e.g. a stringified JSON object to be passed in as command line argument.
The text was updated successfully, but these errors were encountered: