Skip to content

Commit df27a03

Browse files
committed
Added check for argument
1 parent d3d543e commit df27a03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/itkdev-docker-compose

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,20 +266,20 @@ if [[ "$#" -gt "0" && "$1" == "template:install" ]]; then
266266
exit
267267
fi
268268

269-
# Allow enabled NFS without existence of docker-compose.yml.
270-
if [[ "$1" == "nfs:enable" ]]; then
269+
# Allow nfs:enable without existence of docker-compose.yml.
270+
if [[ "$#" -gt "0" && "$1" == "nfs:enable" ]]; then
271271
enableNFS
272272
exit
273273
fi
274274

275275
# Allow version without existence of docker-compose.yml.
276-
if [[ "$1" == "version" ]]; then
276+
if [[ "$#" -gt "0" && "$1" == "version" ]]; then
277277
echo Version: ${VERSION}
278278
exit
279279
fi
280280

281281
# Allow help without existence of docker-compose.yml.
282-
if [[ "$1" == "--help" ]]; then
282+
if [[ "$#" -gt "0" && "$1" == "--help" ]]; then
283283
usage
284284
exit
285285
fi

0 commit comments

Comments
 (0)