From 4a7b263a9ed83c537c79736223f2ad6eaf7a0541 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Wed, 14 Feb 2018 18:27:39 -0800 Subject: [PATCH] Error handling for jekyll. --- dotfiles/zsh_custom/plugins/jekyll/jekyll.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/zsh_custom/plugins/jekyll/jekyll.plugin.zsh b/dotfiles/zsh_custom/plugins/jekyll/jekyll.plugin.zsh index 2d946fd..3565326 100644 --- a/dotfiles/zsh_custom/plugins/jekyll/jekyll.plugin.zsh +++ b/dotfiles/zsh_custom/plugins/jekyll/jekyll.plugin.zsh @@ -112,11 +112,11 @@ function jekyll { fi FILENAME=$(_jekyll_find_post "${TITLE}" "${SLUG}" "${JEKYLL_DIR}") if [ $? -ne 0 ] ; then - return + return 1 fi if ! [[ "${FILENAME}" =~ '/_drafts/' ]] ; then echo "${FILENAME} is not a draft." >&2 - return + return 1 fi NEWNAME=$(echo "${FILENAME}" | sed "s/_drafts\//_posts\/${DATE}-/") mv "${FILENAME}" "${NEWNAME}"