Commit f0d74c2
committed
fix: dispatch subprocess.run now catches 'No module named' in stderr instead of relying on FileNotFoundError
reviewer-A missed that subprocess.run never raises FileNotFoundError when
a Python module is absent — it returns exit code 1 with 'No module named'
in stderr. The old code's except FileNotFoundError was dead code, causing
users to see a raw Python error instead of the friendly install prompt.
Also switched capture_output to True with text=True so stderr is readable,
and added proper stdout/stderr passthrough for successful and failed runs.1 parent a773e53 commit f0d74c2
1 file changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
160 | 176 | | |
161 | 177 | | |
| 178 | + | |
162 | 179 | | |
163 | 180 | | |
164 | 181 | | |
| |||
0 commit comments