Skip to content

Commit d04f1f4

Browse files
author
Cerem Cem ASLAN
committed
bugfix for the filenames that contains white spaces in them
1 parent de2a705 commit d04f1f4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

create-gist.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ USAGE
2121
}
2222

2323
# 0. Your file name
24-
FNAME=${1:-}
25-
if [[ -f $FNAME ]]; then
26-
CONTENT=$(cat $FNAME)
27-
GITHUB_USERNAME=${2:-}
24+
FNAME="${1:-}"
25+
if [[ -f "$FNAME" ]]; then
26+
CONTENT=$(cat "$FNAME")
27+
GITHUB_USERNAME="${2:-}"
2828
else
2929
CONTENT=$(timeout 2 cat -)
30-
GITHUB_USERNAME=${1-}
30+
GITHUB_USERNAME="${1-}"
3131
FNAME="stdin"
3232
if [[ "$CONTENT" == "" ]]; then
3333
print_usage

0 commit comments

Comments
 (0)