aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 5d27a2c..dbf0d4e 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -22,7 +22,7 @@ from . import mesonlib
from .mesonlib import (
MesonException, EnvironmentException, MachineChoice, Popen_safe, PerMachine,
PerMachineDefaultable, PerThreeMachineDefaultable, split_args, quote_arg, OptionKey,
- search_version
+ search_version, MesonBugException
)
from . import mlog
from .programs import (
@@ -750,8 +750,12 @@ class Environment:
def get_coredata(self) -> coredata.CoreData:
return self.coredata
- def get_build_command(self, unbuffered=False):
- cmd = mesonlib.get_meson_command().copy()
+ @staticmethod
+ def get_build_command(unbuffered: bool = False) -> T.List[str]:
+ cmd = mesonlib.get_meson_command()
+ if cmd is None:
+ raise MesonBugException('No command?')
+ cmd = cmd.copy()
if unbuffered and 'python' in os.path.basename(cmd[0]):
cmd.insert(1, '-u')
return cmd