aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mdevenv.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-07-18 15:03:54 +0300
committerGitHub <noreply@github.com>2021-07-18 15:03:54 +0300
commit0be74c78352bbe996599aed39468dadec45d1109 (patch)
treede1ac24c6dec3f496cb86b605d8d1af044cb33c1 /mesonbuild/mdevenv.py
parent6614c7352645770d68bc1adb782fef4da323815a (diff)
parentb5146c02effd53a8b71b2d10f95ecd2358f8241d (diff)
downloadmeson-0be74c78352bbe996599aed39468dadec45d1109.zip
meson-0be74c78352bbe996599aed39468dadec45d1109.tar.gz
meson-0be74c78352bbe996599aed39468dadec45d1109.tar.bz2
Merge pull request #8972 from bonzini/C-symlink
resolve symlinks passed to -C
Diffstat (limited to 'mesonbuild/mdevenv.py')
-rw-r--r--mesonbuild/mdevenv.py5
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.')