Skip to content

Commit 9436b2b

Browse files
committed
stty test 2
1 parent 582b650 commit 9436b2b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/dragon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ while ! [[ -z $1 ]]; do
149149
v | -v ) cat $DRAGON_ROOT_DIR/internal/banner.txt
150150
;;
151151
* ) usage
152-
drexit
152+
drexit 1
153153

154154
esac # who comes up with this syntax lol
155155
shift

src/dragon/shscripts/util

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ drexit()
1515
# This function resets terminal colors, fixes stty (just in case), and then exits with arg0's value
1616
# It should be called on *EVERY* exit, no matter what.
1717
echo -e "${NC}"
18-
stty sane
18+
if [[ -t 0 ]]; then
19+
stty sane
20+
fi
1921
python3 -m dragon.update_check
2022
exit $1
2123
}

0 commit comments

Comments
 (0)