Skip to content

Commit 80912d2

Browse files
committed
Make yarn/npm install lenient during auto-indexing
1 parent 879e6e0 commit 80912d2

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

Dockerfile.autoindex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@ RUN yarn global add npm yarn
1515

1616
RUN yarn global add @sourcegraph/scip-typescript@${TAG} @sourcegraph/src
1717

18+
RUN mv /usr/local/bin/yarn /usr/local/bin/actual-yarn
19+
COPY ./dev/lenient-yarn.sh /usr/local/bin/yarn
20+
21+
RUN mv /usr/local/bin/npm /usr/local/bin/actual-npm
22+
COPY ./dev/lenient-npm.sh /usr/local/bin/npm
23+
1824
CMD ["/bin/sh"]

dev/lenient-npm.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -eux
3+
4+
if [ $# -gt 0 ] && [ "$1" == "install" ]; then
5+
/usr/local/bin/actual-npm "$@" || true
6+
else
7+
/usr/local/bin/actual-npm "$@"
8+
fi

dev/lenient-yarn.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -eux
3+
4+
if [ $# -gt 1 ] && [ "$1" == "install" ]; then
5+
/usr/local/bin/actual-yarn "$@" || true
6+
else
7+
/usr/local/bin/actual-yarn "$@"
8+
fi

0 commit comments

Comments
 (0)