Skip to content

Commit

Permalink
second try to fix poppler path issue on mac os
Browse files Browse the repository at this point in the history
  • Loading branch information
P1zz4br0etch3n committed May 21, 2020
1 parent a244623 commit 94fdfe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/build/settings/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"app_name": "pdf2pro6x",
"author": "Aron Schmidt",
"main_module": "src/main/python/main.py",
"version": "0.3.3"
"version": "0.3.4"
}
5 changes: 4 additions & 1 deletion src/main/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@

def _get_poppler_path_on_mac():
process = subprocess.run(['which', 'pdfinfo'], stdout=subprocess.PIPE)
print('try to find poppler path. return code is %d' % process.returncode)
if process.returncode == 0:
return process.stdout.decode('utf-8').replace('/pdfinfo', '')
path = process.stdout.decode('utf-8').replace('/pdfinfo\n', '')
print('path is %s' % path)
return path
else:
return None

Expand Down

0 comments on commit 94fdfe2

Please sign in to comment.