Code Update

This commit is contained in:
Christer Warén
2025-06-22 00:49:00 +03:00
parent 1a99d2e2a1
commit f86c85dd65
2 changed files with 8 additions and 2 deletions

View File

@ -66,8 +66,11 @@ wx-login(){
then then
if [[ $USER != "root" && $USER != "local" && -f "$HOME/.warengroup/config.json" ]] if [[ $USER != "root" && $USER != "local" && -f "$HOME/.warengroup/config.json" ]]
then
if [[ $(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.username) != "null" ]]
then then
USERNAME="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.username)" USERNAME="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.username)"
fi
TOKEN="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.token)" TOKEN="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.token)"
fi fi

3
wx
View File

@ -296,8 +296,11 @@ wx-login(){
then then
if [[ $USER != "root" && $USER != "local" && -f "$HOME/.warengroup/config.json" ]] if [[ $USER != "root" && $USER != "local" && -f "$HOME/.warengroup/config.json" ]]
then
if [[ $(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.username) != "null" ]]
then then
USERNAME="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.username)" USERNAME="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.username)"
fi
TOKEN="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.token)" TOKEN="$(cat $HOME/.warengroup/config.json | jq -r .login.$ORG.token)"
fi fi