Make environment variables of the system accessible.

This commit is contained in:
Maximilian Paß
2021-11-17 10:16:51 +01:00
parent fbbc96da37
commit cf3db036fa
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ paths:
type: string
example: python exercise.py
environment:
description: Environment variables for this execution. The keys of this object are the variable names and the value of each key is the value of the variable with the same name
description: Environment variables for this execution. The keys of this object are the variable names and the value of each key is the value of the variable with the same name. The environment variables of the system remain accessible.
type: object
additionalProperties:
type: string

View File

@ -24,7 +24,7 @@ type ExecutionRequest struct {
func (er *ExecutionRequest) FullCommand() []string {
command := make([]string, 0)
command = append(command, "env", "-")
command = append(command, "env")
for variable, value := range er.Environment {
command = append(command, fmt.Sprintf("%s=%s", variable, value))
}