Skip to content

Commit d866477

Browse files
authored
Changed where to where.exe
Changed where to where.exe as Powershell has a native where command which was messing up the script if run through a Powershell console on Windows
1 parent c15ed32 commit d866477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pdfkit/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self, wkhtmltopdf='', meta_tag_prefix='pdfkit-', environ=''):
1313
if not self.wkhtmltopdf:
1414
if sys.platform == 'win32':
1515
self.wkhtmltopdf = subprocess.Popen(
16-
['where', 'wkhtmltopdf'], stdout=subprocess.PIPE).communicate()[0].strip()
16+
['where.exe', 'wkhtmltopdf'], stdout=subprocess.PIPE).communicate()[0].strip()
1717
else:
1818
self.wkhtmltopdf = subprocess.Popen(
1919
['which', 'wkhtmltopdf'], stdout=subprocess.PIPE).communicate()[0].strip()
@@ -34,4 +34,4 @@ def __init__(self, wkhtmltopdf='', meta_tag_prefix='pdfkit-', environ=''):
3434

3535
for key in self.environ.keys():
3636
if not isinstance(self.environ[key], str):
37-
self.environ[key] = str(self.environ[key])
37+
self.environ[key] = str(self.environ[key])

0 commit comments

Comments
 (0)