From 696be76bda4c8bf8ed0fc7d0cff2c1358f98aa93 Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Mon, 18 Aug 2025 15:39:09 -0700 Subject: fix: create auth.json if missing --- mcsh.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mcsh.sh') diff --git a/mcsh.sh b/mcsh.sh index 18b0995..b14f897 100755 --- a/mcsh.sh +++ b/mcsh.sh @@ -16,6 +16,10 @@ function auth ( XSTS_TOKEN_URL="https://xsts.auth.xboxlive.com/xsts/authorize" MC_AUTH_URL="https://api.minecraftservices.com/authentication/login_with_xbox" + if ! [[ -e auth.json ]]; then + printf '{}\n' > auth.json + fi + function login ( printf 'getting device code\n' >&2 res="$(curl -s -X POST "$DEVICE_CODE_URL" -H 'Content-Type: application/x-www-form-urlencoded' -d "client_id=$CLIENT_ID&scope=XboxLive.signin%20offline_access")" -- cgit v1.2.3