Skip to content

Commit f69e503

Browse files
committed
updated readme
1 parent b9eda86 commit f69e503

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

bin/fx.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pglaunch() {
77
echo "Docker is not installed. Please install docker and try again."
88
echo "https://docs.docker.com/get-docker"
99
tput sgr0
10-
exit 1
10+
return 1
1111
}
1212

1313
# check if docker is running
@@ -16,7 +16,7 @@ pglaunch() {
1616
tput setaf 1
1717
echo "Docker is not running. Please start docker and try again."
1818
tput sgr0
19-
exit 1
19+
return 1
2020
}
2121

2222
name=""
@@ -30,7 +30,7 @@ pglaunch() {
3030
name="$2"
3131
if [[ -z "$name" ]]; then
3232
echo "-n or --name option requires an argument"
33-
exit 1
33+
return 1
3434
fi
3535
shift 2
3636
;;
@@ -40,7 +40,7 @@ pglaunch() {
4040
port="$2"
4141
if [[ -z "$port" ]]; then
4242
echo "-p or --port option requires an argument"
43-
exit 1
43+
return 1
4444
fi
4545
shift 2
4646
;;
@@ -56,19 +56,19 @@ pglaunch() {
5656
echo "Options:"
5757
echo " -n, --name <name> name for docker container (default: current directory name)"
5858
echo " -p, --port <port> port for postgres container (default: 5555)"
59-
echo " -k, --keep keep postgres container after restart or exit"
60-
echo " -h, --help show this help message and exit"
61-
exit 0
59+
echo " -k, --keep keep postgres container after restart or return"
60+
echo " -h, --help show this help message and return"
61+
return 0
6262
;;
6363

6464
-v | --version)
65-
echo "pglaunch version 2.17.0"
66-
exit 0
65+
echo "pglaunch version 2.18.0"
66+
return 0
6767
;;
6868

6969
*)
7070
echo "Unknown option: $1"
71-
exit 1
71+
return 1
7272
;;
7373
esac
7474
done

0 commit comments

Comments
 (0)