diff options
Diffstat (limited to 'mesonbuild/mdevenv.py')
-rw-r--r-- | mesonbuild/mdevenv.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/mdevenv.py b/mesonbuild/mdevenv.py index 7594db2..c304cbb 100644 --- a/mesonbuild/mdevenv.py +++ b/mesonbuild/mdevenv.py @@ -4,12 +4,12 @@ import tempfile from pathlib import Path from . import build -from .mesonlib import MesonException, is_windows +from .mesonlib import MesonException, RealPathAction, is_windows import typing as T def add_arguments(parser: argparse.ArgumentParser) -> None: - parser.add_argument('-C', default='.', dest='wd', + parser.add_argument('-C', dest='wd', action=RealPathAction, help='directory to cd into before running') parser.add_argument('command', nargs=argparse.REMAINDER, help='Command to run in developer environment (default: interactive shell)') @@ -37,7 +37,6 @@ def get_env(b: build.Build, build_dir: str) -> T.Dict[str, str]: return extra_env.get_env(env) def run(options: argparse.Namespace) -> int: - options.wd = os.path.abspath(options.wd) buildfile = Path(options.wd) / 'meson-private' / 'build.dat' if not buildfile.is_file(): raise MesonException(f'Directory {options.wd!r} does not seem to be a Meson build directory.') |