From 13cfa8258b6e3cbb2eb414992946de44451188bd Mon Sep 17 00:00:00 2001 From: T31M Date: Wed, 10 Jun 2020 19:08:14 +0200 Subject: [PATCH] fixed string cmp --- fish/theme-t31m/ssm_tunnel.fish | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fish/theme-t31m/ssm_tunnel.fish b/fish/theme-t31m/ssm_tunnel.fish index 09e34c2..80990da 100644 --- a/fish/theme-t31m/ssm_tunnel.fish +++ b/fish/theme-t31m/ssm_tunnel.fish @@ -1,14 +1,14 @@ function ssm_tunnel --description 'access private AWS ressources via Bastion Host' - if test (count $argv) -lt 2 - echo "Provide an Host:Port Mapping & an Local Port" - return - end + if test (count $argv) -lt 2 + echo "Provide an Host:Port Mapping & an Local Port" + return + end - if [ $env != "ops" ] - echo "Switch to OPS ENV" - return - end + if [ "$env" != "ops" ] + echo "Switch to OPS ENV first" + return + end # Get bastion host ID using it's name set INSTANCE_ID (aws ec2 describe-instances \ @@ -40,4 +40,4 @@ function ssm_tunnel --description 'access private AWS ressources via Bastion Hos # stop socat on the bastion aws ssm cancel-command --command-id $CMD_INVOC_ID echo "Command Cancelled Successfully." -end \ No newline at end of file +end