From 54f8205478a6d792cd248e5f38f8adb77a4d25b4 Mon Sep 17 00:00:00 2001 From: Sinos Date: Mon, 2 Nov 2020 17:24:15 +0800 Subject: [PATCH] [ refactor ] Optimize var not existing check Co-authored-by: Sandro --- bin/git-ignore-io | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-ignore-io b/bin/git-ignore-io index a1b9abd..07b7582 100755 --- a/bin/git-ignore-io +++ b/bin/git-ignore-io @@ -2,7 +2,7 @@ gitignore_io_url="https://www.gitignore.io/api/" default_path="$HOME/.gi_list" -if [[ ! -z "${XDG_CACHE_HOME}" ]]; then +if [[ -n $XDG_CACHE_HOME ]]; then default_path="$XDG_CACHE_HOME/git-extras/gi_list" mkdir -p "$XDG_CACHE_HOME/git-extras" fi