Skip to content

Commit 77071ed

Browse files
committed
Ensure the ~/.awsd file exists before attempting to read its contents to prevent errors.
1 parent 7f7a312 commit 77071ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/_awsd

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ else
1010
AWS_PROFILE="$AWS_PROFILE" _awsd_prompt "$@"
1111
fi
1212

13-
selected_profile="$(cat ~/.awsd 2>/dev/null || touch ~/.awsd && cat ~/.awsd)"
13+
touch ~/.awsd
14+
selected_profile="$(cat ~/.awsd)"
1415

1516
if [ -z "$selected_profile" ]
1617
then

0 commit comments

Comments
 (0)