diff options
author | Mats Wichmann <mats@linux.com> | 2024-10-19 14:24:33 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2024-10-19 14:25:22 (GMT) |
commit | fb8932b837a2fe63dd5370e5b05a26f930db6f50 (patch) | |
tree | d7f2bd8f57f310d6dfe394d75aa5bb7955ed5bab /testing | |
parent | c25c7b1d727f0da3288fa6c3cad6646e708d11e3 (diff) | |
download | SCons-fb8932b837a2fe63dd5370e5b05a26f930db6f50.zip SCons-fb8932b837a2fe63dd5370e5b05a26f930db6f50.tar.gz SCons-fb8932b837a2fe63dd5370e5b05a26f930db6f50.tar.bz2 |
Move IS_ROOT definition to framework
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/framework/TestCmd.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py index 240aa6c..243745d 100644 --- a/testing/framework/TestCmd.py +++ b/testing/framework/TestCmd.py @@ -329,6 +329,10 @@ IS_WINDOWS = sys.platform == 'win32' IS_MACOS = sys.platform == 'darwin' IS_64_BIT = sys.maxsize > 2**32 IS_PYPY = hasattr(sys, 'pypy_translation_info') +try: + IS_ROOT = os.geteuid() == 0 +except AttributeError: + IS_ROOT = False NEED_HELPER = os.environ.get('SCONS_NO_DIRECT_SCRIPT') # sentinel for cases where None won't do |