Skip to content

Commit 2c3033d

Browse files
committed
[JIRA DEVA11Y-128] Added checks to verify availability of zsh and fish
1 parent 8e92a84 commit 2c3033d

4 files changed

Lines changed: 24 additions & 0 deletions

File tree

scripts/fish/cli.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Shell specific
44
fish_bin=$(command -v fish)
5+
6+
if [[ -z "$fish_bin" ]]; then
7+
echo "Fish shell is not installed(or not available in PATH). Please install Fish shell to use this script."
8+
exit 2
9+
fi
10+
511
export BROWSERSTACK_USERNAME=$($fish_bin -lic 'echo $BROWSERSTACK_USERNAME' | tail -n 1)
612
export BROWSERSTACK_ACCESS_KEY=$($fish_bin -lic 'echo $BROWSERSTACK_ACCESS_KEY' | tail -n 1)
713

scripts/fish/spm.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Shell specific
44
fish_bin=$(command -v fish)
5+
6+
if [[ -z "$fish_bin" ]]; then
7+
echo "Fish shell is not installed(or not available in PATH). Please install Fish shell to use this script."
8+
exit 2
9+
fi
10+
511
export BROWSERSTACK_USERNAME=$($fish_bin -lic 'echo $BROWSERSTACK_USERNAME' | tail -n 1)
612
export BROWSERSTACK_ACCESS_KEY=$($fish_bin -lic 'echo $BROWSERSTACK_ACCESS_KEY' | tail -n 1)
713

scripts/zsh/cli.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Shell specific
44
zsh_bin=$(command -v zsh)
5+
6+
if [[ -z "$zsh_bin" ]]; then
7+
echo "Zsh shell is not installed(or not available in PATH). Please install Zsh shell to use this script."
8+
exit 2
9+
fi
10+
511
export BROWSERSTACK_USERNAME=$($zsh_bin -lic 'echo $BROWSERSTACK_USERNAME' | tail -n 1)
612
export BROWSERSTACK_ACCESS_KEY=$($zsh_bin -lic 'echo $BROWSERSTACK_ACCESS_KEY' | tail -n 1)
713

scripts/zsh/spm.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Shell specific
44
zsh_bin=$(command -v zsh)
5+
6+
if [[ -z "$zsh_bin" ]]; then
7+
echo "Zsh shell is not installed(or not available in PATH). Please install Zsh shell to use this script."
8+
exit 2
9+
fi
10+
511
export BROWSERSTACK_USERNAME=$($zsh_bin -lic 'echo $BROWSERSTACK_USERNAME' | tail -n 1)
612
export BROWSERSTACK_ACCESS_KEY=$($zsh_bin -lic 'echo $BROWSERSTACK_ACCESS_KEY' | tail -n 1)
713

0 commit comments

Comments
 (0)