Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle installation for 'fish' shell #690

Merged
merged 3 commits into from
Oct 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/install-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ yarn_link() {
command printf "${SOURCE_STR}"
else
if ! grep -q 'yarn' "$YARN_PROFILE"; then
command printf "$SOURCE_STR" >> "$YARN_PROFILE"
if [[ $YARN_PROFILE == *"fish"* ]]; then
command fish -c 'set -U fish_user_paths $fish_user_paths ~/.yarn/bin'
else
command printf "$SOURCE_STR" >> "$YARN_PROFILE"
fi
fi

printf "$cyan> We've added the following to your $YARN_PROFILE\n"
Expand Down Expand Up @@ -61,6 +65,8 @@ yarn_detect_profile() {
fi
elif [ "$SHELLTYPE" = "zsh" ]; then
DETECTED_PROFILE="$HOME/.zshrc"
elif [ "$SHELLTYPE" = "fish" ]; then
DETECTED_PROFILE="$HOME/.config/fish/config.fish"
fi

if [ -z "$DETECTED_PROFILE" ]; then
Expand All @@ -72,6 +78,8 @@ yarn_detect_profile() {
DETECTED_PROFILE="$HOME/.bash_profile"
elif [ -f "$HOME/.zshrc" ]; then
DETECTED_PROFILE="$HOME/.zshrc"
elif [ -f "$HOME/.config/fish/config.fish" ]; then
DETECTED_PROFILE="$HOME/.config/fish/config.fish"
fi
fi

Expand Down