From 80ab70da048ef046c380992fa5aaf3cdb7a9acae Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 9 Apr 2025 18:11:23 +0200 Subject: [PATCH] chore: remove invoke-binary.js and update main.go logic --- invoke-binary.js | 30 ------------------------------ main.go | 9 +++++++-- 2 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 invoke-binary.js diff --git a/invoke-binary.js b/invoke-binary.js deleted file mode 100644 index 69baa60..0000000 --- a/invoke-binary.js +++ /dev/null @@ -1,30 +0,0 @@ -const childProcess = require('child_process') -const path = require('path') - -function runGo() { - const goProcess = childProcess.spawnSync( - 'go', - ['run', '.'], - { - cwd: __dirname, - stdio: 'inherit', - shell: true, - }, - ) - - if (goProcess.error) { - console.error('Failed to execute `go run .`:', goProcess.error) - process.exit(1) - } - - if (goProcess.status !== 0) { - console.error( - '`go run .` exited with code', - goProcess.status, - goProcess.stderr ? goProcess.stderr.toString() : '', - ) - process.exit(goProcess.status) - } -} - -runGo() diff --git a/main.go b/main.go index ff508bd..8ae3d03 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,11 @@ import ( ) func main() { - prTitle := os.Getenv("GITEA_PULL_REQUEST_TITLE") - fmt.Println(prTitle) + // Get all environment variables + environ := os.Environ() + + // Print each environment variable + for _, env := range environ { + fmt.Println(env) + } }