Global environment settings do not work for local "drone exec"

When I run my pipeline locally with “drone exec” the global “environment” section is not used.

Example pipeline:

---
kind: pipeline
type: docker
name: default

environment:
  TOP_LEVEL: top

steps:
  - name: build
    image: alpine
    environment:
      SAME_LEVEL: same
    commands:
      - echo $TOP_LEVEL
      - echo $SAME_LEVEL

Result in cloud.drone.io :

+ echo $TOP_LEVEL
top
+ echo $SAME_LEVEL
same

Result with “drone exec”:

[build:0] + echo $TOP_LEVEL
[build:1]
[build:2] + echo $SAME_LEVEL
[build:3] same

I assume this is a bug as the behaviour is different between the cloud and local executions. Can anybody confirm that?

Edit:
The problem seems to be that a local “drone exec” uses the deprecated “drone-runtime” whereas in the cloud the new “drone-runner-docker” is used. That’s why the feature sets are diverging.