File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import pathlib
3
3
import platform
4
+ import shutil
4
5
import sys
5
6
6
7
import click
7
8
8
9
from 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
10
11
11
12
from ..__about__ import __version__
12
13
from .utils import tmuxp_echo
@@ -62,7 +63,7 @@ def format_tmux_resp(std_resp):
62
63
"tmux version: %s" % get_version (),
63
64
"libtmux version: %s" % libtmux_version ,
64
65
"tmuxp version: %s" % __version__ ,
65
- "tmux path: %s" % which ("tmux" ),
66
+ "tmux path: %s" % shutil . which ("tmux" ),
66
67
"tmuxp path: %s" % tmuxp_path ,
67
68
"shell: %s" % os .environ ["SHELL" ],
68
69
output_break (),
Original file line number Diff line number Diff line change 8
8
import logging
9
9
import os
10
10
import pathlib
11
+ import shutil
11
12
import sys
12
13
from typing import List
13
14
14
15
import click
15
16
import kaptan
16
17
17
- from libtmux .common import has_gte_version , which
18
+ from libtmux .common import has_gte_version
18
19
from libtmux .server import Server
19
20
20
21
from .. import config , exc , log , util
@@ -357,7 +358,7 @@ def load_workspace(
357
358
colors = colors ,
358
359
)
359
360
360
- which ("tmux" ) # raise exception if tmux not found
361
+ shutil . which ("tmux" ) # raise exception if tmux not found
361
362
362
363
try : # load WorkspaceBuilder object for tmuxp config / tmux server
363
364
builder = WorkspaceBuilder (
Original file line number Diff line number Diff line change 2
2
import logging
3
3
import os
4
4
import pathlib
5
+ import shutil
5
6
import typing as t
6
7
7
8
import pytest
10
11
from _pytest .fixtures import SubRequest
11
12
12
13
from libtmux import exc
13
- from libtmux .common import which
14
14
from libtmux .server import Server
15
15
from libtmux .test import TEST_SESSION_PREFIX , get_test_session_name , namer
16
16
from tests .fixtures import utils as test_utils
@@ -140,7 +140,7 @@ def add_doctest_fixtures(
140
140
request : SubRequest ,
141
141
doctest_namespace : t .Dict [str , t .Any ],
142
142
) -> None :
143
- if isinstance (request ._pyfuncitem , DoctestItem ) and which ("tmux" ):
143
+ if isinstance (request ._pyfuncitem , DoctestItem ) and shutil . which ("tmux" ):
144
144
doctest_namespace ["server" ] = request .getfixturevalue ("server" )
145
145
session : "Session" = request .getfixturevalue ("session" )
146
146
doctest_namespace ["session" ] = session
You can’t perform that action at this time.
0 commit comments