From 4280cd0c0dd4f73fa77008563a78f4f82105ee94 Mon Sep 17 00:00:00 2001 From: Fredrik Lassen Date: Tue, 24 Feb 2026 16:19:05 +0100 Subject: [PATCH] #9 - sad sed fix --- commands/host/1x-token-setup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/host/1x-token-setup b/commands/host/1x-token-setup index 4009c47..d460aff 100644 --- a/commands/host/1x-token-setup +++ b/commands/host/1x-token-setup @@ -76,9 +76,11 @@ fi # A simple append might create duplicates, so let's try to be a bit smarter or just append as requested # Make this work on MacOS and Linux >.< if [[ $OSTYPE == darwin* ]]; then - sed -i '' '/\/\/git.1xinternet.de\/api\/v4\/packages\/npm\/:_authToken=/d' ~/.ddev/homeadditions/.npmrc + # "in-place editing only works for regular files" thus change directly ~/.npmrc + sed -i '' '/\/\/git.1xinternet.de\/api\/v4\/packages\/npm\/:_authToken=/d' ~/.npmrc else - sed -i '/\/\/git.1xinternet.de\/api\/v4\/packages\/npm\/:_authToken=/d' ~/.ddev/homeadditions/.npmrc + # "In-place editing" works also for symlinks on Linux, but for consistency's sake. + sed -i '/\/\/git.1xinternet.de\/api\/v4\/packages\/npm\/:_authToken=/d' ~/.npmrc fi echo "//git.1xinternet.de/api/v4/packages/npm/:_authToken=${PERSONAL_ACCESS_TOKEN}" >> ~/.ddev/homeadditions/.npmrc