Bower + Symlink = Hate

lundi 12 janvier 2015
I'm used to manage my dotfiles through a git repo and symlink the repo's files to my home directory.
Bower is a front-end dependcy manager which can be configured with a .bowerrc file located in your home. Today I had the regret to constat that bower doesn't support symlinks in the configuration bootstrap stage.

[user@host$]$ bower install
/home/daniel/npm/node_modules/bower/node_modules/bower-config/lib/util/rc.js:55
throw error;
^
Error: Unable to parse /home/daniel/.bowerrc: Unexpected token !
at parse (/home/daniel/npm/node_modules/bower/node_modules/bower-config/lib/util/rc.js:48:21)
at json (/home/daniel/npm/node_modules/bower/node_modules/bower-config/lib/util/rc.js:70:12)
at rc (/home/daniel/npm/node_modules/bower/node_modules/bower-config/lib/util/rc.js:29:22)
at Config.load (/home/daniel/npm/node_modules/bower/node_modules/bower-config/lib/Config.js:14:20)
at Function.Config.read (/home/daniel/npm/node_modules/bower/node_modules/bower-config/lib/Config.js:49:19)
at readCachedConfig (/home/daniel/npm/node_modules/bower/lib/config.js:21:51)
at defaultConfig (/home/daniel/npm/node_modules/bower/lib/config.js:11:24)
at Object.<anonymous> (/home/daniel/npm/node_modules/bower/lib/index.js:40:32)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
view raw gistfile1.txt hosted with ❤ by GitHub
The "!"token comes from the hexa decode of the symlink
213c73796d6c696e6b3efffe2f006300
79006700640072006900760065002f00
63002f0042005500530054004f004f00
4c0053002f0064006f00740066006900
6c00650073002f007a00730068007200
63000000
Equals
!<symlink>ÿþ/c?ygdrive/?c/BUSTOO?LS/dotfi?les/zshr?c
view raw gistfile2.txt hosted with ❤ by GitHub

This seems to be confirmed by this comment
https://github.com/bower/bower/issues/730#issuecomment-24390523

So until a cleaner solution, I have to copy the file from my github repo to my home dir.

Aucun commentaire :

Enregistrer un commentaire