Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10dc9e3

Browse files
authored
fix: Force keeping old files to prevent dpkg failure on update (#2399)
Updating a release if system files failed would result in failure from the install script. This fixes it!
1 parent 75205f5 commit 10dc9e3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ install_deb() {
329329

330330
fetch "https://github.com/coder/coder/releases/download/v$VERSION/coder_${VERSION}_${OS}_${ARCH}.deb" \
331331
"$CACHE_DIR/coder_${VERSION}_$ARCH.deb"
332-
sudo_sh_c dpkg -i "$CACHE_DIR/coder_${VERSION}_$ARCH.deb"
332+
sudo_sh_c dpkg --force-confdef --force-confold -i "$CACHE_DIR/coder_${VERSION}_$ARCH.deb"
333333

334334
echo_systemd_postinstall deb
335335
}

preinstall.sh

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ USER="coder"
66
# Add a Coder user to run as in systemd.
77
if ! id -u $USER >/dev/null 2>&1; then
88
useradd \
9+
--create-home \
910
--system \
1011
--user-group \
1112
--shell /bin/false \

0 commit comments

Comments
 (0)