Don't change directories when interpreting files #1791
Labels
tech debt
Issues that document or involve technical debt
type: enhancement
Issues describing an improvement to an existing feature or capability
A while ago, #17 was originally fixed by changing directories when interpreting files. Recently, in #1770, a latent bug introduced by this behavior was fixed. As @kquick mentions here, though, this directory-changing behavior is a bit clumsy by nature.
The better thing to do would be to maintain the "current" directory in an environment, and when interacting with a file system, prepend that directory to the filename as it appears. This will still allow for the relative imports the author of #17 desired, while more neatly eliminating the bug fixed in #1770.
This is low-priority, especially if the likes of
SAWScript.Interpreter.interpretFile
is never used in a library context, but the fix would still benefit the health of the codebase.The text was updated successfully, but these errors were encountered: