We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5b0445 commit 086e8c2Copy full SHA for 086e8c2
codeql_bundle/cli.py
@@ -1,3 +1,12 @@
1
+# Add the parent directory to the path if this module is run directly (i.e. not imported)
2
+# This is necessary to support both the Poetry script invocation and the direct invocation.
3
+if not __package__ and __name__ == "__main__":
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ sys.path.append(str(Path(__file__).parent.parent))
8
+ __package__ = Path(__file__).parent.name
9
10
import click
11
from pathlib import Path
12
from codeql_bundle.helpers.codeql import CodeQLException
0 commit comments