diff --git a/.devcontainer/.env.example b/.devcontainer/.env.example index 85e5df8..bfc9adb 100644 --- a/.devcontainer/.env.example +++ b/.devcontainer/.env.example @@ -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 # PostgreSQL Configuration diff --git a/.devcontainer/library-scripts/load-env.sh b/.devcontainer/library-scripts/load-env.sh index 410cbd9..b145bed 100755 --- a/.devcontainer/library-scripts/load-env.sh +++ b/.devcontainer/library-scripts/load-env.sh @@ -53,8 +53,18 @@ fi if [[ -n "${pat}" ]] && [[ "${#pat}" -gt 30 ]]; then export GITHUB_PERSONAL_ACCESS_TOKEN="${pat}" echo "GitHub Personal Access Token loaded successfully" - exit 0 + # Use return instead of exit when script is sourced + if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + return 0 + else + exit 0 + fi else echo >&2 "ERROR: Could not find valid GitHub Personal Access Token" - exit 1 + # Use return instead of exit when script is sourced + if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + return 1 + else + exit 1 + fi fi