fix: Make sure with have a projet before loading plugins.
This commit is contained in:
parent
f3dcfd8bf0
commit
c33e5316bd
|
@ -118,6 +118,9 @@ class Context(IContext):
|
|||
|
||||
def loadAllTargets() -> list[TargetManifest]:
|
||||
projectRoot = project.root()
|
||||
if projectRoot is None:
|
||||
return []
|
||||
|
||||
pj = loadProject(projectRoot)
|
||||
paths = list(
|
||||
map(lambda e: os.path.join(const.EXTERN_DIR, e, const.TARGETS_DIR), pj.extern.keys())
|
||||
|
|
|
@ -23,12 +23,13 @@ def loadAll():
|
|||
logger.info("Loading plugins...")
|
||||
|
||||
projectRoot = project.root()
|
||||
pj = context.loadProject(projectRoot)
|
||||
paths = list(map(lambda e: os.path.join(const.EXTERN_DIR, e), pj.extern.keys())) + ["."]
|
||||
|
||||
|
||||
if projectRoot is None:
|
||||
logger.info("Not in project, skipping plugin loading")
|
||||
return
|
||||
|
||||
pj = context.loadProject(projectRoot)
|
||||
paths = list(map(lambda e: os.path.join(const.EXTERN_DIR, e), pj.extern.keys())) + ["."]
|
||||
|
||||
for dirname in paths:
|
||||
pluginDir = os.path.join(projectRoot, dirname, const.META_DIR, "plugins")
|
||||
|
|
Loading…
Reference in a new issue