File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,21 @@ def run_before_script(
3030) -> int :
3131 """Execute shell script, ``tee``-ing output to both terminal (if TTY) and buffer."""
3232 script_cmd = shlex .split (str (script_file ))
33- proc = subprocess .Popen (
34- script_cmd ,
35- cwd = cwd ,
36- stdout = subprocess .PIPE ,
37- stderr = subprocess .PIPE ,
38- text = True , # decode to str
39- errors = "backslashreplace" ,
40- )
33+
34+ try :
35+ proc = subprocess .Popen (
36+ script_cmd ,
37+ cwd = cwd ,
38+ stdout = subprocess .PIPE ,
39+ stderr = subprocess .PIPE ,
40+ text = True , # decode to str
41+ errors = "backslashreplace" ,
42+ )
43+ except FileNotFoundError as e :
44+ raise exc .BeforeLoadScriptNotExists (
45+ e ,
46+ os .path .abspath (script_file ), # NOQA: PTH100
47+ ) from e
4148
4249 out_buffer = []
4350 err_buffer = []
You can’t perform that action at this time.
0 commit comments