diff --git a/commands/host/1x-token-setup b/commands/host/1x-token-setup index 2b0e8e5..08f3337 100644 --- a/commands/host/1x-token-setup +++ b/commands/host/1x-token-setup @@ -76,19 +76,19 @@ fi # Setup token for NPM # Remove old token if exists to replace with new one, or just append # A simple append might create duplicates, so let's try to be a bit smarter or just append as requested -sed_compat -i '/\/\/git.1xinternet.de\/:_authToken=/d' ~/.npmrc -echo "//git.1xinternet.de/:_authToken=${PERSONAL_ACCESS_TOKEN}" >> ~/.ddev/homeadditions/.npmrc +sed_compat -i '/\/\/git.1xinternet.de\/.*:_authToken=/d' ~/.npmrc +echo "//git.1xinternet.de/:_authToken=${PERSONAL_ACCESS_TOKEN}" >> ~/.npmrc # Configure NPM in homeadditions so the container picks it up. # We append if not already present to avoid duplication -if ! grep -q "@dxp:registry=https://git.1xinternet.de/api/v4/groups/392/-/packages/npm/" ~/.ddev/homeadditions/.npmrc; then - echo "@dxp:registry=https://git.1xinternet.de/api/v4/groups/392/-/packages/npm/" >> ~/.ddev/homeadditions/.npmrc +if ! grep -q "@dxp:registry=https://git.1xinternet.de/api/v4/groups/392/-/packages/npm/" ~/.npmrc; then + echo "@dxp:registry=https://git.1xinternet.de/api/v4/groups/392/-/packages/npm/" >> ~/.npmrc fi # Configure NPM in homeadditions so the container picks it up. # We append if not already present to avoid duplication -if ! grep -q "@1xINTERNET:registry=https://git.1xinternet.de/api/v4/group/1121/-/packages/npm/" ~/.ddev/homeadditions/.npmrc; then - echo "@1xINTERNET:registry=https://git.1xinternet.de/api/v4/projects/1121/packages/npm/" >> ~/.ddev/homeadditions/.npmrc +if ! grep -q "@1xINTERNET:registry=https://git.1xinternet.de/api/v4/projects/1121/packages/npm/" ~/.npmrc; then + echo "@1xINTERNET:registry=https://git.1xinternet.de/api/v4/projects/1121/packages/npm/" >> ~/.npmrc fi # Start the DDEV project (so containers run).