mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
Update GitHub PAT configuration and improve script exit handling
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
# GitHub MCP Server Configuration
|
# GitHub Finance Devcontainer Configuration
|
||||||
|
# Generate a Personal Access Token here https://github.com/settings/tokens
|
||||||
|
# requires 'repo', 'read:org', 'admin:public_key'
|
||||||
GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here
|
GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here
|
||||||
|
|
||||||
# PostgreSQL Configuration
|
# PostgreSQL Configuration
|
||||||
|
|||||||
@@ -53,8 +53,18 @@ fi
|
|||||||
if [[ -n "${pat}" ]] && [[ "${#pat}" -gt 30 ]]; then
|
if [[ -n "${pat}" ]] && [[ "${#pat}" -gt 30 ]]; then
|
||||||
export GITHUB_PERSONAL_ACCESS_TOKEN="${pat}"
|
export GITHUB_PERSONAL_ACCESS_TOKEN="${pat}"
|
||||||
echo "GitHub Personal Access Token loaded successfully"
|
echo "GitHub Personal Access Token loaded successfully"
|
||||||
|
# Use return instead of exit when script is sourced
|
||||||
|
if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo >&2 "ERROR: Could not find valid GitHub Personal Access Token"
|
echo >&2 "ERROR: Could not find valid GitHub Personal Access Token"
|
||||||
|
# Use return instead of exit when script is sourced
|
||||||
|
if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user