From 2e60b9032e12a105edaefba58059990f5d9e18df Mon Sep 17 00:00:00 2001 From: Istvan Szekeres Date: Mon, 20 Nov 2023 16:51:05 +0000 Subject: [PATCH] Fix glob Fixes #708 glob.glob has many possible arguments but the current wrapping solution doesn't cover all them. This change directly passes all args (positional and kw) as-is to the wrapped function. --- sh.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh.py b/sh.py index 28654e5a..08903d56 100644 --- a/sh.py +++ b/sh.py @@ -457,12 +457,12 @@ def __init__(self, path, results): list.__init__(self, results) -def glob(path, recursive=False): - expanded = GlobResults(path, _old_glob(path, recursive=recursive)) +def glob(path, *args, **kwargs): + expanded = GlobResults(path, _old_glob(path, *args, **kwargs)) return expanded -glob_module.glob = glob +glob_module.glob = glob # type: ignore def canonicalize(path):