Skip to content

Commit

Permalink
Merge pull request #90 from Pennycook/remove-rootdir-option
Browse files Browse the repository at this point in the history
Remove --root-dir option
  • Loading branch information
Pennycook authored Apr 3, 2024
2 parents 2486942 + 454407f commit 1482c03
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions bin/codebasin
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ def main():
help="Display version information and exit.",
)
deprecated_args = parser.add_argument_group("deprecated options")
deprecated_args.add_argument(
"-r",
"--rootdir",
dest="rootdir",
metavar="<dir>",
default=None,
help="Set working root directory. "
+ "Defaults to current working directory.",
)
deprecated_args.add_argument(
"-c",
"--config",
Expand Down Expand Up @@ -171,17 +162,8 @@ def main():
DeprecationWarning,
)

# Determine the root directory based on the -r flag.
rootpath = None
if not args.rootdir:
rootpath = os.getcwd()
elif args.rootdir:
warnings.warn(
"--rootdir (-r) is deprecated.",
DeprecationWarning,
)
rootpath = args.rootdir
rootdir = os.path.realpath(rootpath)
# Determine the root directory based on where codebasin is run.
rootdir = os.path.realpath(os.getcwd())

if args.config_file and args.analysis_file:
raise RuntimeError(
Expand Down

0 comments on commit 1482c03

Please sign in to comment.