microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.72k stars 1.41k forks source link

Error with cat conda-notice.txt first time a cpp container is opened #1640

Closed jesustorresdev closed 1 year ago

jesustorresdev commented 1 year ago

Steps to Reproduce:

  1. Start a Dev Container mcr.microsoft.com/vscode/devcontainers/cpp
  2. First time the terminal shows this error: cat: /conda-notice.txt: No such file or directory

This causes because /etc/bash.bashrc contains the next lines:

if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
    cat "${DEV_CONTAINERS_DIR}/conda-notice.txt"
    mkdir -p "$HOME/.config/vscode-dev-containers"
    ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &)
fi

These lines don't exist in container builds from base Dev Container Definition, so I guess are added during cpp imagen build. But I haven't found where.

dougludlow commented 1 year ago

Looks like a dupe of https://github.com/microsoft/vscode-dev-containers/issues/1617.

jesustorresdev commented 1 year ago

You are right. It is.

samruddhikhandale commented 1 year ago

We missed releasing a new cpp image with the bug fix.

I'll post an update on this thread when its fixed.

samruddhikhandale commented 1 year ago

Fixed with the cpp image release.

image