All files are regenerated if the destination is inside the source #1870

Closed
vonavi opened this Issue Dec 25, 2013 · 2 comments

Comments

Projects
None yet
3 participants

vonavi commented Dec 25, 2013

Hi guys!

There is a bug in lib/jekyll/commands/build.rb, see this line:

dest = Pathname.new(destination).relative_path_from(Pathname.new(source)).to_s

Method relative_path_from is valid in the following cases: If self is absolute, the argument must be absolute too. If self is relative, the argument must be relative too.

The pathname source is absolute. You use absolute destination here, but then it is rewritten from _config.yml. As a result, destination is relative as a rule, and relative_path_from raises ArgumentError. In turn, variable ignored becomes nil, and all files in the destination inside the source are regenerated.

Best regards,
Vladimir

@parkr parkr modified the milestone: 2.1, 2.0 May 5, 2014

Owner

parkr commented Jun 16, 2014

Should be fixed by #2459.

parkr closed this Jun 16, 2014

vonavi commented Jun 16, 2014

I can't check if the issue fixed or not, because I faced with #2516.

jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.