Allow the use of absolute paths in the lib_dirs configuration setting #101

merged 2 commits into from Jun 18, 2013


None yet

2 participants


Right now the {lib_dirs, []} configuration setting in rebar.config only accepts relative paths. This commit also adds support for absolute paths.

@dizzyd dizzyd commented on an outdated diff Jun 18, 2013
@@ -412,7 +412,10 @@ expand_lib_dirs([], _Root, Acc) ->
expand_lib_dirs([Dir | Rest], Root, Acc) ->
Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])),
- FqApps = [filename:join([Root, A]) || A <- Apps],
+ FqApps = case filename:pathtype(Dir) of
+ absolute -> Apps;
+ relative -> [filename:join([Root, A]) || A <- Apps]
dizzyd Jun 18, 2013 Member

This will blow up on windows machines as pathtype/1 can also return 'volumerelative'. I would suggest just matching 'absolute' and any other case will revert to old behaviour.


You're right, sorry for the silly mistake. I've fixed that and updated the pull request branch.

@dizzyd dizzyd merged commit 271299a into rebar:master Jun 18, 2013
@jcomellas jcomellas deleted the jcomellas:jc-absolute-lib-dirs branch Jun 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment