File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11import os
22import pathlib
33import platform
4+ import shutil
45import sys
56
67import click
78
89from libtmux import __version__ as libtmux_version
9- from libtmux .common import get_version , tmux_cmd , which
10+ from libtmux .common import get_version , tmux_cmd
1011
1112from ..__about__ import __version__
1213from .utils import tmuxp_echo
@@ -62,7 +63,7 @@ def format_tmux_resp(std_resp):
6263 "tmux version: %s" % get_version (),
6364 "libtmux version: %s" % libtmux_version ,
6465 "tmuxp version: %s" % __version__ ,
65- "tmux path: %s" % which ("tmux" ),
66+ "tmux path: %s" % shutil . which ("tmux" ),
6667 "tmuxp path: %s" % tmuxp_path ,
6768 "shell: %s" % os .environ ["SHELL" ],
6869 output_break (),
Original file line number Diff line number Diff line change 88import logging
99import os
1010import pathlib
11+ import shutil
1112import sys
1213from typing import List
1314
1415import click
1516import kaptan
1617
17- from libtmux .common import has_gte_version , which
18+ from libtmux .common import has_gte_version
1819from libtmux .server import Server
1920
2021from .. import config , exc , log , util
@@ -357,7 +358,7 @@ def load_workspace(
357358 colors = colors ,
358359 )
359360
360- which ("tmux" ) # raise exception if tmux not found
361+ shutil . which ("tmux" ) # raise exception if tmux not found
361362
362363 try : # load WorkspaceBuilder object for tmuxp config / tmux server
363364 builder = WorkspaceBuilder (
Original file line number Diff line number Diff line change 22import logging
33import os
44import pathlib
5+ import shutil
56import typing as t
67
78import pytest
1011from _pytest .fixtures import SubRequest
1112
1213from libtmux import exc
13- from libtmux .common import which
1414from libtmux .server import Server
1515from libtmux .test import TEST_SESSION_PREFIX , get_test_session_name , namer
1616from tests .fixtures import utils as test_utils
@@ -140,7 +140,7 @@ def add_doctest_fixtures(
140140 request : SubRequest ,
141141 doctest_namespace : t .Dict [str , t .Any ],
142142) -> None :
143- if isinstance (request ._pyfuncitem , DoctestItem ) and which ("tmux" ):
143+ if isinstance (request ._pyfuncitem , DoctestItem ) and shutil . which ("tmux" ):
144144 doctest_namespace ["server" ] = request .getfixturevalue ("server" )
145145 session : "Session" = request .getfixturevalue ("session" )
146146 doctest_namespace ["session" ] = session
You can’t perform that action at this time.
0 commit comments