Permalink
Browse files

Switch newer-than logic to get the desired behavior

In the old version, the function returned true (0) if the cache file
was newer than the Cakefile, which was *always* unless the Cakefile
had been updated. Therefore we generated the file every time unless
the Cakefile was updated, which was precisely when we needed to
regenerate the cache file.

Now it generates the cache file only when the Cakefile has been
updated.
  • Loading branch information...
1 parent 550ccca commit e60458793ab9703bb65adb6c326f43c6bd5fd126 @mcornella mcornella committed Dec 17, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/cake/cake.plugin.zsh
@@ -15,7 +15,7 @@ _cake_does_target_list_need_generating () {
fi
[ ! -f ${_cake_task_cache_file} ] && return 0;
- [ ${_cake_task_cache_file} -nt Cakefile ] && return 0;
+ [ Cakefile -nt ${_cake_task_cache_file} ] && return 0;
return 1;
}

0 comments on commit e604587

Please sign in to comment.