Skip to content

#25 Update sed command to remove old auth token pattern#30

Merged
frega merged 1 commit intomainfrom
normanlolx-patch-1
Feb 25, 2026
Merged

#25 Update sed command to remove old auth token pattern#30
frega merged 1 commit intomainfrom
normanlolx-patch-1

Conversation

@normanlolx
Copy link
Copy Markdown
Member

@normanlolx normanlolx commented Feb 25, 2026

This should match echo "//git.1xinternet.de/:_authToken=${PERSONAL_ACCESS_TOKEN}" >> ~/.ddev/homeadditions/.npmrc

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the host-side token setup script to delete an npm auth token entry using the newer/root //git.1xinternet.de/:_authToken= key, aiming to prevent duplicate/legacy token lines in ~/.npmrc during 1x GitLab token setup.

Changes:

  • Adjusted sed deletion patterns (macOS + Linux) to target //git.1xinternet.de/:_authToken= entries.
  • Minor diff-only change in a commented line (no functional impact).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 79 to +83
# "in-place editing only works for regular files" thus change directly ~/.npmrc
sed -i '' '/\/\/git.1xinternet.de\/api\/v4\/packages\/npm\/:_authToken=/d' ~/.npmrc
sed -i '' '/\/\/git.1xinternet.de\/:_authToken=/d' ~/.npmrc
else
# "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
sed -i '/\/\/git.1xinternet.de\/:_authToken=/d' ~/.npmrc
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated sed pattern only removes the root token entry (//git.1xinternet.de/:_authToken=). If a user still has the previous path-scoped token entry (the /api/v4/.../packages/npm/ key that this script used to delete), it will now be left behind, resulting in multiple GitLab token lines in ~/.npmrc and potentially ambiguous auth behavior. Consider deleting both the old path-scoped pattern and the new root pattern (or using a single regex that matches both) before appending the new token.

Copilot uses AI. Check for mistakes.
@frega frega merged commit 3148be5 into main Feb 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants