From a6fc47162ab547cde424c9c5e136682711680db3 Mon Sep 17 00:00:00 2001 From: Tim Perkins Date: Sun, 7 Jun 2026 15:00:52 -0400 Subject: [PATCH] Fix potential sed issue To make a replacement with the whole match, `&` should be used. The previous `\0` could be treated as a literal null byte. Even though it wasn't, and it did work as expected. --- containers/base/Containerfile | 2 +- containers/emacs/doom_cache/Containerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index d04c59e..10f08b9 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -160,7 +160,7 @@ RUN BASH_CONFIG_DIR=$SHELL_CONFIG_DIR/bash \ # Modify PS1 to put a * after the hostname. This is sort of useful because it # let's you quickly see if you are inside the container or not. -RUN sed -i 's;PS1.*\\h;\0*;' /root/.bashrc $DEV_USER_HOME/.bashrc +RUN sed -i 's;PS1.*\\h;&*;' /root/.bashrc $DEV_USER_HOME/.bashrc # Enable GPG agent by adding GPG_TTY RUN { \ diff --git a/containers/emacs/doom_cache/Containerfile b/containers/emacs/doom_cache/Containerfile index 572e942..b2e7644 100644 --- a/containers/emacs/doom_cache/Containerfile +++ b/containers/emacs/doom_cache/Containerfile @@ -56,5 +56,5 @@ RUN mkdir -p $DE_DOOM_DIR \ && cp $DE_EMACS_DIR/static/init.example.el $DE_DOOM_DIR/init.el \ && cp $DE_EMACS_DIR/static/config.example.el $DE_DOOM_DIR/config.el \ && cp $DE_EMACS_DIR/static/packages.example.el $DE_DOOM_DIR/packages.el \ - && sed -e "s/[(]\?evil/;;\0/" -e "s/;;\([(]\?vterm\)/\1/" -i $DE_DOOM_DIR/init.el \ + && sed -e "s/[(]\?evil/;;&/" -e "s/;;\([(]\?vterm\)/\1/" -i $DE_DOOM_DIR/init.el \ && doom install --force --verbose --no-config --no-env --no-hooks