Skip to content

Commit

Permalink
Fix unpacking on error
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Oct 20, 2023
1 parent dc161ca commit 2e97a16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vspreview/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ def main(_args: Sequence[str] | None = None, no_exit: bool = False) -> int:

return exit_func(0, no_exit)

script, file_resolve_plugin = get_resolved_script(Path(script_path_or_command).resolve())
script = get_resolved_script(Path(script_path_or_command).resolve())

if isinstance(script, int):
return exit_func(script, no_exit)

script, file_resolve_plugin = script

if not args.preserve_cwd:
os.chdir(script.path.parent)

Expand Down

0 comments on commit 2e97a16

Please sign in to comment.