Commit f2983a5
[This SO answer](https://stackoverflow.com/a/62923810) provides good
detail about the difference between launching a python file (aka `python
app/main.py`) and launching a python module (aka `python -m
widget_store.main`). In particular for this PR, launching a file
automatically adds the file's parent directory to `sys.path` while
launching a module adds the current directory.
`dbos debug` was always ensuring the current directory (represented by
empty string) was in `sys.path`, so it was failing when attempting to
debug a file in a subdirectory. This code fixes that + isolates the
change to `sys.path` to only happen for file launch. Module launch does
not require `sys.path` changes because `dbos debug` is already launching
in the debugger as a module so the current directory will already be on
the path
Co-authored-by: Harry Pierson <[email protected]>
1 parent 712285e commit f2983a5
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments