Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions commands/host/1x-token-setup
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down