_extract_directory_from_argv#
- barecat.cli.main._extract_directory_from_argv()[source]#
Extract -C/–directory value from sys.argv before argparse parsing.
This allows -C to appear after positional arguments (like tar), which argparse doesn’t support natively. We remove the -C flag and its value from sys.argv so argparse doesn’t see it twice.
- Returns:
The directory path if -C/–directory was found, None otherwise.