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

cffsubr/tx crashes on macOS if env TMPDIR names a non-existent path #21

Open
rsms opened this issue Jun 14, 2022 · 3 comments
Open

cffsubr/tx crashes on macOS if env TMPDIR names a non-existent path #21

rsms opened this issue Jun 14, 2022 · 3 comments

Comments

@rsms
Copy link

rsms commented Jun 14, 2022

When tx is run (in my case via fontmake) and the TMPDIR environment variable is set to a path that does not exist, tx crashes.

Repro:

( TMPDIR=/does/not/exist ; \
  fontmake -u RSMSIntra-Condensed.ufo -o otf --output-path out.otf \
    --overlaps-backend pathops --production-names --optimize-cff 2 \
    --verbose DEBUG

Full log here: https://gist.github.com/rsms/e9946c7f28bb6e663b622e9c4b7f16f0

tx seem to write data and then read it back in again. I wonder if it can skip that disk write-and-read middle step?

@anthrotype
Copy link
Member

anthrotype commented Jun 14, 2022

Hm yeah, there were a couple issues with tx reading from stdin and writing to stdout so we had to use temp files

Grep for "tempfile" below and see the inline comments (sorry I'm writing from mobile phone)
https://github.com/adobe-type-tools/cffsubr/blob/master/src/cffsubr/__init__.py

Perhaps those issues have been fixed in tx upstream, I don't know.

PRs welcome

@anthrotype
Copy link
Member

Didn't mean to close sorry.. Why do you set TMPDIR environment variable to a path that does not exist?

@rsms
Copy link
Author

rsms commented Jun 14, 2022

Why do you set TMPDIR environment variable to a path that does not exist?

It was an accident; a makefile included by another makefile used a variable with the same name (and unfortunately in make, make variables and env variables share scope.)

Once I figured out what was going on I changed the make variable.

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

No branches or pull requests

2 participants