Skip to content

Commit

Permalink
Gacct: Adding --cwd alias
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Dec 25, 2022
1 parent a14f3b8 commit 50adb8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GooseSLURM/sacct.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def cli_parser() -> argparse.ArgumentParser:
type=str,
help="Filter jobs whose WorkDir has this root (WorkDir printed relative to this root).",
)
parser.add_argument("-C", "--cwd", action="store_true", help="Same as ``--root .``.")
parser.add_argument(
"-L", "--allclusters", action="store_true", help="Display jobs ran on all clusters."
)
Expand Down Expand Up @@ -167,6 +168,10 @@ def Gacct(args: list[str]):
args = parser.parse_args(args)
extra = [i for i in args.extra]

if args.cwd:
assert not args.root
args.root = "."

if args.root is not None:
if "WorkDir" not in extra:
extra += ["WorkDir"]
Expand Down

0 comments on commit 50adb8c

Please sign in to comment.