Skip to content

Commit 8fffc50

Browse files
committed
Remove --source-dir (-S) option
We are contemplating adding support for per-platform source directories in a future release. Adding such functionality would make the -S flag harder to understand, as some users may expect to be able to specify -S multiple times. To avoid being stuck supporting -S after 1.2.0, remove it for now. Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 1a6dce2 commit 8fffc50

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

bin/codebasin

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ def main():
5252
default=None,
5353
help="Set working root directory (default .)",
5454
)
55-
parser.add_argument(
56-
"-S",
57-
"--source-dir",
58-
metavar="<path>",
59-
dest="source_dir",
60-
default=None,
61-
help="Set path to source directory. "
62-
+ "The default is the current directory.",
63-
)
6455
deprecated_args.add_argument(
6556
"-c",
6657
"--config",
@@ -167,19 +158,13 @@ def main():
167158
DeprecationWarning,
168159
)
169160

170-
# Determine the root directory based on the -S and -r flags.
161+
# Determine the root directory based on the -r flag.
171162
rootpath = None
172-
if args.source_dir and args.rootdir:
173-
raise RuntimeError(
174-
"Cannot specify both --source-dir (-S) and --rootdir (-r).",
175-
)
176-
if not args.source_dir and not args.rootdir:
163+
if not args.rootdir:
177164
rootpath = os.getcwd()
178-
elif args.source_dir:
179-
rootpath = args.source_dir
180165
elif args.rootdir:
181166
warnings.warn(
182-
"--rootdir (-r) is deprecated. Use --source-dir (-S) instead.",
167+
"--rootdir (-r) is deprecated.",
183168
DeprecationWarning,
184169
)
185170
rootpath = args.rootdir

0 commit comments

Comments
 (0)