Jetbrains Rider suggestions

I ran the file on Rider and it had a few suggestions

<img width="506" alt="image" src="https://user-images.githubusercontent.com/44338423/180635394-cb45defa-47f4-444c-ad10-e0fc89522fe7.png">
This commit is contained in:
Ishan Jalan 2022-07-24 12:07:38 +05:30
parent a50a730886
commit dd2e3e9d93
1 changed files with 13 additions and 11 deletions

View File

@ -55,7 +55,7 @@ if [ "$(uname)" == "Darwin" ]; then
if [ "$USE_CURRENT_SHELL" == "false" ]; then if [ "$USE_CURRENT_SHELL" == "false" ]; then
echo "Reopening in the Terminal app..." echo "Reopening in the Terminal app..."
echo '#!/bin/sh' > /tmp/open-smapi-terminal.command echo '#!/bin/sh' > /tmp/open-smapi-terminal.command
echo "\"$0\" $@ --use-current-shell" >> /tmp/open-smapi-terminal.command echo "\"$0\" $* --use-current-shell" >> /tmp/open-smapi-terminal.command
chmod +x /tmp/open-smapi-terminal.command chmod +x /tmp/open-smapi-terminal.command
cat /tmp/open-smapi-terminal.command cat /tmp/open-smapi-terminal.command
open -W /tmp/open-smapi-terminal.command open -W /tmp/open-smapi-terminal.command
@ -71,8 +71,8 @@ fi
########## ##########
# script must be run from the game folder # script must be run from the game folder
if [ ! -f "Stardew Valley.dll" ]; then if [ ! -f "Stardew Valley.dll" ]; then
echo "Oops! SMAPI must be placed in the Stardew Valley game folder.\nSee instructions: https://stardewvalleywiki.com/Modding:Player_Guide"; printf "Oops! SMAPI must be placed in the Stardew Valley game folder.\nSee instructions: https://stardewvalleywiki.com/Modding:Player_Guide";
read read -r
exit 1 exit 1
fi fi
@ -102,37 +102,39 @@ else
# find the true shell behind x-terminal-emulator # find the true shell behind x-terminal-emulator
if [ "$TERMINAL_NAME" = "x-terminal-emulator" ]; then if [ "$TERMINAL_NAME" = "x-terminal-emulator" ]; then
export TERMINAL_NAME="$(basename "$(readlink -f $(command -v x-terminal-emulator))")" TERMINAL_NAME="$(basename "$(readlink -f "$(command -v x-terminal-emulator)")")"
export TERMINAL_NAME
fi fi
# run in selected terminal and account for quirks # run in selected terminal and account for quirks
export TERMINAL_PATH="$(command -v $TERMINAL_NAME)" TERMINAL_PATH="$(command -v "$TERMINAL_NAME")"
if [ -x $TERMINAL_PATH ]; then export TERMINAL_PATH
if [ -x "$TERMINAL_PATH" ]; then
case $TERMINAL_NAME in case $TERMINAL_NAME in
terminal|termite) terminal|termite)
# consumes only one argument after -e # consumes only one argument after -e
# options containing space characters are unsupported # options containing space characters are unsupported
exec $TERMINAL_NAME -e "env TERM=xterm $LAUNCH_FILE $@" exec "$TERMINAL_NAME" -e "env TERM=xterm $LAUNCH_FILE $*"
;; ;;
xterm|konsole|alacritty) xterm|konsole|alacritty)
# consumes all arguments after -e # consumes all arguments after -e
exec $TERMINAL_NAME -e env TERM=xterm $LAUNCH_FILE "$@" exec "$TERMINAL_NAME" -e env TERM=xterm $LAUNCH_FILE "$*"
;; ;;
terminator|xfce4-terminal|mate-terminal) terminator|xfce4-terminal|mate-terminal)
# consumes all arguments after -x # consumes all arguments after -x
exec $TERMINAL_NAME -x env TERM=xterm $LAUNCH_FILE "$@" exec "$TERMINAL_NAME" -x env TERM=xterm $LAUNCH_FILE "$*"
;; ;;
gnome-terminal) gnome-terminal)
# consumes all arguments after -- # consumes all arguments after --
exec $TERMINAL_NAME -- env TERM=xterm $LAUNCH_FILE "$@" exec "$TERMINAL_NAME" -- env TERM=xterm $LAUNCH_FILE "$*"
;; ;;
kitty) kitty)
# consumes all trailing arguments # consumes all trailing arguments
exec $TERMINAL_NAME env TERM=xterm $LAUNCH_FILE "$@" exec "$TERMINAL_NAME" env TERM=xterm $LAUNCH_FILE "$*"
;; ;;
*) *)