Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling shell in subprocess call requires arguments as list #35

Closed
atesca09 opened this issue Sep 14, 2022 · 3 comments · Fixed by #36
Closed

Disabling shell in subprocess call requires arguments as list #35

atesca09 opened this issue Sep 14, 2022 · 3 comments · Fixed by #36

Comments

@atesca09
Copy link

This commit 0fbd5ee broke the processing of fonts for me.

According to the python subprocess documentation, if parameters are to be passed to the executable they have to be passed as a list, otherwise if they are passed in the string they are interpreted to be the commant to be executed.

I think it should look like

import shlex
...
call(shlex.split('ttfautohint --symbol --fallback-script=latn --no-info "%(font)s.ttf" "%(font)s-hinted.ttf" && mv "%(font)s-hinted.ttf" "%(font)s.ttf"' % {'font': fontfile}))
...
call(shlex.split('python "%(path)s/../../bin/eotlitetool.py" "%(font)s.ttf" --output "%(font)s.eot"' % {'path': scriptPath, 'font': fontfile}))
@L2jLiga
Copy link
Owner

L2jLiga commented Oct 4, 2022

Hi there, would you like to send PR to fix the issue?

@atesca09
Copy link
Author

atesca09 commented Oct 4, 2022

@L2jLiga done

@L2jLiga
Copy link
Owner

L2jLiga commented Oct 4, 2022

Thanks! Released as v4.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants