Comments (10)
If you have errors in your LESS file and the path is not writable, it will just say it wasn't writable since that's the first case in the switch statement. I'm just guessing here though, will have to do some more testing.
from yii-less.
I think that it should be logged and ignored silently.
On Jul 14, 2013 11:11 PM, "Jalle19" [email protected] wrote:
If you have errors in your LESS file and the path is not writable, it
will just say it wasn't writable since that's the first case in the switch
statement. I'm just guessing here though, will have to do some more testing.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-20942842
.
from yii-less.
Perhaps the best way would be to check for is_writable further up in the code, then throw an exception during compilation if the return code is not zero. There was a check for writeablility before but it was broken so I removed it (should be is_writable(dirname($cssPath)), not is_writable($cssPath). I'll see if I can whip up a PR later today.
from yii-less.
I had a look at this and my previous assumptions turned out to be false, although I am unable to reproduce this. If the CSS path is not writable and the LESS contains errors, lessc will exit with code 1 (parse error). After fixing the LESS errors, it will exit with code 2 (write error).
from yii-less.
I'll also try to provide an example for this bug to reproduce.
But we definitely should not just log this silently, since you won't really recognize this if it's "only" in the logs.
Both parsing errors and permission errors have to throw an exception.
from yii-less.
I agree, exceptions have to be thrown since both errors are fatal.
from yii-less.
Agreed, I was just thinking about how to less parser on Grunt works. Sorry
for the bad idea.
On Mon, Jul 15, 2013 at 9:59 PM, Jalle19 [email protected] wrote:
I agree, exceptions have to be thrown since both errors are fatal.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-20994694
.
Best regards,
Christoffer Niska
Phone +358 500 980 565
E-mail [email protected]
from yii-less.
Error output if file is not writable:
Failed to compile file "/phundament/app/app/themes/frontend/less/p3.less" using command: "/opt/local/bin/node" "/phundament/app/app/../vendor/cloudhead/less.js/bin/lessc" "/phundament/app/app/themes/frontend/less/p3.less" "/phundament/app/app/../www/../app/themes/frontend/assets/p3.css" 2>&1. The error was: �Error: EACCES, permission denied '/phundament/app/app/themes/frontend/assets/p3.css'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at /phundament/app/vendor/cloudhead/less.js/bin/lessc:160:24
at finish (/phundament/app/vendor/cloudhead/less.js/lib/less/parser.js:473:26)
at /phundament/app/vendor/cloudhead/less.js/lib/less/parser.js:105:48
at /phundament/app/vendor/cloudhead/less.js/lib/less/index.js:134:13
at finish (/phundament/app/vendor/cloudhead/less.js/lib/less/parser.js:473:26)
at /phundament/app/vendor/cloudhead/less.js/lib/less/parser.js:105:48
at /phundament/app/vendor/cloudhead/less.js/lib/less/index.js:134:13
at Object.Parser.parser.parse (/phundament/app/vendor/cloudhead/less.js/lib/less/parser.js:476:17)�
from yii-less.
@crisu83 @Jalle19 Any objections or can I create a 2.0.2 version?
from yii-less.
Fine by me!
from yii-less.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii-less.