Add CODEOCEAN environment variable.

This commit is contained in:
Maximilian Paß
2022-06-09 23:26:36 +02:00
committed by Sebastian Serth
parent 2f066a9fb4
commit 59ca63268b
2 changed files with 10 additions and 5 deletions

View File

@ -25,6 +25,12 @@ type ExecutionRequest struct {
func (er *ExecutionRequest) FullCommand() []string {
command := make([]string, 0)
command = append(command, "env")
if er.Environment == nil {
er.Environment = make(map[string]string)
}
er.Environment["CODEOCEAN"] = "true"
for variable, value := range er.Environment {
command = append(command, fmt.Sprintf("%s=%s", variable, value))
}