Skip to content

Commit

Permalink
Merge pull request #26 from GovTechSG/v1.4.1
Browse files Browse the repository at this point in the history
bug fixes
  • Loading branch information
Salihan04 authored Aug 1, 2019
2 parents 32a4a3d + eee768d commit 4eeef0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions slist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ do
config-file)
configfile=true
val="${!OPTIND}"; OPTIND=$(( OPTIND + 1 ))
check_arg "$val"
# Exit program if host is empty
if [[ $value == "false" ]]; then
printf "%s\n" "${red}Host cannot be empty ${end}"
printf "%s\n" "${red}Config cannot be empty with --config-file${end}"
exit 1
fi
config_file=$val
Expand Down Expand Up @@ -353,7 +354,7 @@ fi
if [[ $help == "true" ]]; then
help
elif [[ $edit == "true" ]]; then
vi ~/.ssh/config
vi "$config_file"
elif [[ $add_host == "true" ]] && [[ $del_host == "true" ]]; then
printf "%s\n" "${red}--add-host and --del-host cannot be use at the same time ${end}"
exit 3
Expand Down

0 comments on commit 4eeef0d

Please sign in to comment.