Skip to content

Commit a6b2d5c

Browse files
authored
makes the n program available in the autoindex image (#313)
This is used by the default auto index script in the main repo
1 parent 395fcb8 commit a6b2d5c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Dockerfile.autoindex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN apk add --no-cache git bash curl ca-certificates python3 make libstdc++ libg
1111
# conversion.
1212
RUN echo 'scip-typescript "$@" --no-progress-bar' > /usr/bin/scip-typescript-autoindex && chmod +x /usr/bin/scip-typescript-autoindex
1313

14-
RUN yarn global add npm yarn
14+
RUN yarn global add npm yarn n
1515

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

@@ -21,4 +21,7 @@ COPY ./dev/lenient-yarn.sh /usr/local/bin/yarn
2121
RUN mv /usr/local/bin/npm /usr/local/bin/actual-npm
2222
COPY ./dev/lenient-npm.sh /usr/local/bin/npm
2323

24+
RUN mv /usr/local/bin/n /usr/local/bin/actual-n
25+
COPY ./dev/lenient-n.sh /usr/local/bin/n
26+
2427
CMD ["/bin/sh"]

dev/lenient-n.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -eux
3+
4+
/usr/local/bin/actual-n "$@" || echo "scip-typescript: ignoring n auto failure, will try to auto-index the project with the pre-installed node version"

0 commit comments

Comments
 (0)