[elbe-devel] [PATCH 16/19] elbepack: validate devel mode without using elbe_dir

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Mar 19 08:47:45 CET 2024


Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/commands/init.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
index ded827d1c9b9..fe936254fcd2 100644
--- a/elbepack/commands/init.py
+++ b/elbepack/commands/init.py
@@ -20,7 +20,7 @@ from elbepack.shellhelper import do, system
 from elbepack.templates import get_initvm_preseed, write_template
 from elbepack.treeutils import etree
 from elbepack.validate import validate_xml
-from elbepack.version import elbe_version
+from elbepack.version import elbe_version, is_devel
 from elbepack.xmldefaults import ElbeDefaults
 
 
@@ -94,7 +94,7 @@ def run_command(argv):
 
     with elbe_logging({'files': None}):
         if opt.devel:
-            if not os.path.isdir(os.path.join(elbe_dir, 'elbepack')):
+            if not is_devel:
                 logging.error('Devel Mode only valid, '
                               'when running from elbe checkout')
                 sys.exit(80)

-- 
2.44.0



More information about the elbe-devel mailing list