-
Notifications
You must be signed in to change notification settings - Fork 1
Add tooling utils #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Is there any reason why we can't wait for devcontainers/spec#209 to be implemented in the CLI? |
no reason whatsoever! if we can wait until then, that's less work for me 👍 |
I do not think it is worthwhile to deviate from the standard workflow to implement this. |
sounds like a plan! 🚀 should i just copy the two script into the src/id/utils folder manually for now then? 🤔 # shellcheck shell=bash
clear_local_apt_index() (
set -e
rm -rf /var/lib/apt/lists/*
echo '🟩 Cleared local apt index'
)
# shellcheck shell=bash
ensure_apt_packages() (
set -e
export DEBIAN_FRONTEND=noninteractive
if dpkg -s "$@" &>/dev/null; then
echo "🟦 $@ is already installed"
else
if [[ $(find /var/lib/apt/lists/* | wc -l) == 0 ]]; then
echo '🟪 Updating local apt index...'
apt-get update -y
echo '🟩 Updated local apt index'
fi
echo "🟪 Installing $@..."
apt-get install -y --no-install-recommends "$@"
echo "🟩 Installed $@"
fi
)
|
I think manual copying is best at this time. I would prefer not to split scripts for functions of that length. |
This PR would...
devcontainer features test
if the proposal to make shared stuff is already here, then this is redundant! yay! 🥳
devcontainers/spec#209
it just needs to be implemented in the cli... until then, we're stuck doing the
cp utils src/$ID/utils
manually 🤷♀️