Skip to content

[Bug]: Unexpected environment in postCreateCommand #768

Description

@DavidToneian

Before submitting

  • I have searched existing issues to confirm this is not a duplicate
  • I am running the latest version of DevPod

What happened?

Hi,

I'm trying to spin up the devcontainer of the A2A repository. On line 25 of .devcontainer/setup.sh, the script calls go without specifying a full path. This works on VSCode, but does not when using devpod up.

I suspect the underlying issue is the same as #1354 of loft-sh/devpod. A2A's devcontainer.json makes use of the features mechanism.

Other bugs in loft-sh/devpod that is possibly related: postCreateCommand cannot find executables that should be in PATH (#1234)

Thanks!

What did you expect to happen instead?

Successful completion of postCreateCommand

Steps to reproduce

  1. Checkout https://github.com/a2aproject/A2A
  2. devpod up $(dirname $(realpath A2A)) --ide vscode

devcontainer.json

{
    "name": "A2A Development",
    "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
    "features": {
        "ghcr.io/devcontainers/features/python:1": {
            "version": "3.12"
        },
        "ghcr.io/devcontainers/features/go:1": {
            "version": "latest"
        },
        "ghcr.io/devcontainers/features/node:1": {
            "version": "lts"
        }
    },
    "postCreateCommand": "bash .devcontainer/setup.sh",
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "ms-python.vscode-pylance",
                "bufbuild.vscode-buf",
                "streetsidesoftware.code-spell-checker"
            ],
            "settings": {
                "python.defaultInterpreterPath": "/usr/local/bin/python"
            }
        }
    },
    "forwardPorts": [
        8000
    ],
    "remoteUser": "vscode"
}

Error output / logs

19:03:08 warn .devcontainer/setup.sh: line 25: go: command not found tunnelserver.go:428
[...]
19:03:08 fatal run agent command failed: exit status 1: Process exited with status 1

How often does this happen?

Every time

Operating system

Linux

Linux distribution (if applicable)

No response

Architecture

AMD64

Desktop app or CLI?

CLI only

DevPod version

v0.25.2

DevPod provider

Docker

Provider version

No response

Screenshots

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions