aboutsummaryrefslogtreecommitdiff
path: root/patchtree/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'patchtree/cli.py')
-rw-r--r--patchtree/cli.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/patchtree/cli.py b/patchtree/cli.py
index 8e923dd..9ddb4fb 100644
--- a/patchtree/cli.py
+++ b/patchtree/cli.py
@@ -46,7 +46,7 @@ def parse_arguments(config: Config) -> Context:
action="store_true",
)
parser.add_argument("target", help="target directory or archive")
- parser.add_argument("patch", help="patch input glob(s)", nargs="+")
+ parser.add_argument("patch", help="patch input glob(s)", nargs="*")
options = parser.parse_args()
@@ -56,6 +56,9 @@ def parse_arguments(config: Config) -> Context:
if options.shebang:
config.output_shebang = True
+ if len(options.patch) == 0:
+ options.patch = config.default_patch_sources
+
try:
return config.context(config, options)
except Exception as e: