chore: remove invoke-binary.js and update main.go logic
All checks were successful
Lint Pull Request / Lint Pr Title (pull_request) Successful in 9s

This commit is contained in:
Jan K9f 2025-04-09 18:11:23 +02:00
parent 6d9c48078c
commit 80ab70da04
Signed by: jank
GPG key ID: B9F475106B20F144
2 changed files with 7 additions and 32 deletions

View file

@ -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()

View file

@ -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)
}
}