Skip to content

Commit 023a0f6

Browse files
committed
Optionally pass cqlshrc file from environment
1 parent f5a91d1 commit 023a0f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c-cqlsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ assert_instance_exists "$ID"
1515
shift 1
1616

1717
CONFDIR=`config_directory $ID`
18+
CQLSHRC=${CQLSHRC:-"$CONFDIR"/cqlshrc}
1819

1920
use_ssl()
2021
{
@@ -26,4 +27,4 @@ use_ssl()
2627
}
2728

2829

29-
sudo cqlsh --cqlshrc="$CONFDIR"/cqlshrc `use_ssl` `listen_hostname $ID` "$@"
30+
sudo cqlsh --cqlshrc="$CQLSHRC" `use_ssl` `listen_hostname $ID` "$@"

0 commit comments

Comments
 (0)