From 97cc560b7b337455bcdb0b31380869a41843a52c Mon Sep 17 00:00:00 2001 From: Dmytro Serdiuk Date: Mon, 6 Apr 2020 16:53:55 +0300 Subject: [PATCH] Open a given workflows file when `polish-workflow` There is undefined `${file}` variable that is used as a reference to a given workflows file. But the variable is never initialized. As the result, the command just opens the editor, but not a given file. Now, this variable is replaced with `${1}` (a reference to the first input parameter). --- libexec/git-elegant-polish-workflow | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/git-elegant-polish-workflow b/libexec/git-elegant-polish-workflow index 4869a9f..5c9d263 100644 --- a/libexec/git-elegant-polish-workflow +++ b/libexec/git-elegant-polish-workflow @@ -27,10 +27,10 @@ MESSAGE default() { _error-if-empty "${1}" "Please specify a workflow file name" - if test -e ${file}; then - $(git config core.editor) ${file} + if test -e ${1}; then + $(git config core.editor) ${1} else - error-text "The '${file}' file does not exist." + error-text "The '${1}' file does not exist." exit 43 fi }