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

lesscpy.compile needs to clean up tmp file(s) #102

Open
mjskier opened this issue May 3, 2019 · 0 comments
Open

lesscpy.compile needs to clean up tmp file(s) #102

mjskier opened this issue May 3, 2019 · 0 comments

Comments

@mjskier
Copy link

mjskier commented May 3, 2019

When you call lescpy.compile(), it leaves /tmp/yacctab.py behind.

This is an issue in a multiuser environment as that file is owned by the first person to call compile().
If a different user tries to run any program that use that function, compile() will fail as it doesn't have permission to write the file:

To reproduce:
Run the simple one liner on you have at the bottom of the READ.md

print(lesscpy.compile(StringIO(u"a { border-width: 2px * 3; }"), minify=True))

then chmod 000 /tmp/yacctab.py
then try to run the lesscpy.compile command again. You will get

WARNING: Couldn't create 'yacctab'. [Errno 13] Permission denied: '/tmp/yacctab.py'

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

1 participant