From cf3db036facf0b97f8bfd4598b59489550613a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Wed, 17 Nov 2021 10:16:51 +0100 Subject: [PATCH] Make environment variables of the system accessible. --- api/swagger.yaml | 2 +- pkg/dto/dto.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 53227de..e611aa7 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -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 diff --git a/pkg/dto/dto.go b/pkg/dto/dto.go index 1291889..889e5d3 100644 --- a/pkg/dto/dto.go +++ b/pkg/dto/dto.go @@ -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)) }