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

Allow spaces in jobname #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run_lualatex.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
return_code = subprocess.call(
args=[
latexrun_file,
"--latex-args=-shell-escape -jobname=" + job_name,
"--latex-args=-shell-escape -jobname='" + job_name.replace("'", "'\\''") + "'",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use something a bit more robust here, like shlex.quote() or pipes.quote() if we have to support Python 2 (I'm really not familiar with Python and don't know how to tell from a quick glance whether this is Python 2 or 3...)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something, we're using Python 3 (https://bazel.build/reference/be/python#py_binary.python_version). shlex.quote() would likely be the best way forward here.

"--latex-cmd=lualatex",
"-Wall",
] + sys.argv[ARGS_COUNT:] + [main_file],
Expand Down