Skip to content

Commit e3047ca

Browse files
committed
before_script errors return full path to file.
1 parent df47cbf commit e3047ca

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tmuxp/util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def run_before_script(script_file):
3232
try:
3333
proc = subprocess.Popen(
3434
script_file,
35-
# stdout=subprocess.PIPE,
3635
stderr=subprocess.PIPE
3736
)
3837
proc.wait()
@@ -43,12 +42,12 @@ def run_before_script(script_file):
4342
stderr = console_to_str(stderr).split('\n')
4443
stderr = '\n'.join(list(filter(None, stderr))) # filter empty values
4544

46-
raise exc.BeforeLoadScriptError(proc.returncode, script_file, stderr)
45+
raise exc.BeforeLoadScriptError(proc.returncode, os.path.abspath(script_file), stderr)
4746

4847
return proc.returncode
4948
except OSError as e:
5049
if e.errno == 2:
51-
raise exc.BeforeLoadScriptNotExists(e, script_file)
50+
raise exc.BeforeLoadScriptNotExists(e, os.path.abspath(script_file))
5251
else:
5352
raise(e)
5453

0 commit comments

Comments
 (0)