mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Simplify Repository.cmd_runner
This commit is contained in:
parent
f9db2b5b06
commit
c5cbd473c7
4 changed files with 24 additions and 46 deletions
|
|
@ -40,7 +40,7 @@ class PrefixedCommandRunner(object):
|
|||
For instance:
|
||||
PrefixedCommandRunner('/tmp/foo').run(['{prefix}foo.sh', 'bar', 'baz'])
|
||||
|
||||
will run ['/tmpl/foo/foo.sh', 'bar', 'baz']
|
||||
will run ['/tmp/foo/foo.sh', 'bar', 'baz']
|
||||
"""
|
||||
def __init__(self, prefix_dir, popen=subprocess.Popen, makedirs=os.makedirs):
|
||||
self.prefix_dir = prefix_dir.rstrip(os.sep) + os.sep
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue