diff --git a/entrypoint.sh b/entrypoint.sh index b27e4dfe..9cf7f6c6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -54,7 +54,7 @@ else exit 1 fi - command+=" --with-token <<<\"${GITHUB_TOKEN}\"" + command+=" --with-token - <<<\"${GITHUB_TOKEN}\"" fi exec 3>&1 diff --git a/trestlebot/cli.py b/trestlebot/cli.py index 365e4f95..cc4ef9cb 100644 --- a/trestlebot/cli.py +++ b/trestlebot/cli.py @@ -230,7 +230,11 @@ def run() -> None: ) sys.exit(1) - git_provider = GitHub(access_token=args.with_token) + if not args.with_token: + logger.error("with-token value cannot be empty") + sys.exit(1) + + git_provider = GitHub(access_token=args.with_token.read().strip()) exit_code: int = 0