Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
+5
-3
@@ -91,6 +91,8 @@ rules above, a scoring run on docs/comprehension-history.md's newest scored comm
|
||||
ending in its overall, an item that is not exempt scoring under the bar, or --check finding the file
|
||||
unranked, or an item's `Touches:` list unreadable.
|
||||
"""
|
||||
from collections.abc import Mapping
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
@@ -99,14 +101,14 @@ from plan_store.stores import file_plan
|
||||
from project_config.main import located
|
||||
|
||||
|
||||
def main(argv: list[str], home: pathlib.Path) -> int:
|
||||
def main(argv: list[str], home: pathlib.Path, env: Mapping[str, str]) -> int:
|
||||
if argv[:1] in (["-h"], ["--help"]):
|
||||
print(__doc__.strip())
|
||||
return 0
|
||||
args = parse_args(argv)
|
||||
if isinstance(args, Failure):
|
||||
return fail(args)
|
||||
config = located(None, home)
|
||||
config = located(None, home, env)
|
||||
if isinstance(config, Failure):
|
||||
return fail(config)
|
||||
if config.plan_file is None and args == (True, None):
|
||||
@@ -145,4 +147,4 @@ def parse_args(argv: list[str]) -> tuple[bool, pathlib.Path | None] | Failure:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:], pathlib.Path.home()))
|
||||
sys.exit(main(sys.argv[1:], pathlib.Path.home(), os.environ))
|
||||
|
||||
Reference in New Issue
Block a user