veged / borschik

Main repository moved to https://github.com/bem/borschik. Extendable builder for text-based file formats.
http://bem.info/articles/borschik/
94 stars 0 forks source link

Борщик падает если freeze_paths попадает в follow_symlinks #57

Closed alexeyten closed 11 years ago

alexeyten commented 11 years ago

Если freeze_paths попадает в область действия follow_symlinks и его ещё нет, то борщик падает с такой ошибкой.

$ cat .borschik 
{
    "paths": {
        "./": "/"
    },
    "follow_symlinks": {
        "./": true
    },
    "freeze_paths": {
        "./": "_/"
    }
}

$ cat bug.css 
body {
    background: url(image.png);
}

$ borschik -m no -i bug.css
Error: ENOENT, no such file or directory '/home/lynn/tmp/_'
    at Object.lstatSync (fs.js:410:18)
    at isSymLink (/home/lynn/p/borschik/lib/freeze.js:345:15)
    at /home/lynn/p/borschik/lib/freeze.js:288:32
    at /home/lynn/p/borschik/lib/freeze.js:169:25
    at /home/lynn/p/borschik/lib/freeze.js:137:5
    at /home/lynn/p/borschik/lib/freeze.js:284:35
    at Object.processImage (/home/lynn/p/borschik/lib/freeze.js:22:19)
    at [object Object].processLink (/home/lynn/p/borschik/lib/techs/css-base.js:29:37)
    at [object Object].process (/home/lynn/p/borschik/lib/tech.js:67:54)
    at SpecificTranslator.$borschik [as borschik] (/home/lynn/p/borschik/lib/techs/css.ometajs.js:169:24)
From previous event:
    at Cmd._do (/home/lynn/p/borschik/node_modules/coa/lib/cmd.js:424:14)
    at Cmd.do (/home/lynn/p/borschik/node_modules/coa/lib/cmd.js:471:17)
    at Cmd.run (/home/lynn/p/borschik/node_modules/coa/lib/cmd.js:459:21)
    at Object.<anonymous> (/home/lynn/p/borschik/bin/borschik:3:23)
arikon commented 11 years ago

@afelix Это тебе, critical

afelix commented 11 years ago

Уточним, чего ожидаем. После фикса он всё равно будет падать, но уже ожидаемо: отсутствие image.png. Все с этим согласны?