Skip to content

Commit

Permalink
move fnm to /usr/local/share/fnm
Browse files Browse the repository at this point in the history
  • Loading branch information
julienp committed Aug 28, 2024
1 parent d93457f commit cadd43b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docker/pulumi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ RUN ln -s /usr/local/share/pypoetry/bin/poetry /usr/local/bin/
RUN poetry config virtualenvs.prefer-active-python true

# Install default nodejs versions and associated tools
RUN curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/opt/fnm" --skip-shell && \
ln -s /opt/fnm/fnm /usr/local/bin/fnm
RUN curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/share/fnm" --skip-shell && \
ln -s /usr/local/share/fnm/fnm /usr/local/bin/fnm
ENV FNM_COREPACK_ENABLED="true"
ENV FNM_VERSION_FILE_STRATEGY="recursive"
ENV FNM_DIR=/opt/fnm
ENV FNM_DIR=/usr/local/share/fnm
RUN fnm install 18 && \
fnm install 20 && \
fnm install 22 && \
fnm alias 18 default
ENV PATH=/opt/fnm/aliases/default/bin:$PATH
ENV PATH=/usr/local/share/fnm/aliases/default/bin:$PATH
RUN corepack install --global pnpm yarn

# Passing --build-arg PULUMI_VERSION=vX.Y.Z will use that version
Expand All @@ -139,7 +139,7 @@ ARG PULUMI_VERSION
# Install the Pulumi SDK, including the CLI and language runtimes.
# TODO: Should use $PULUMI_VERSION, not dev
# RUN curl -fsSL https://get.pulumi.com/ | bash -s -- --version $PULUMI_VERSION && \
RUN curl -fsSL https://get.pulumi.com | bash -s -- --version dev && \
RUN curl -fsSL https://get.pulumi.com | sh -s -- --version dev && \
mv ~/.pulumi/bin/* /usr/bin

# I think it's safe to say if we're using this mega image, we want pulumi
Expand Down
10 changes: 5 additions & 5 deletions tests/containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,26 +290,26 @@ func TestEnvironment(t *testing.T) {
name: "node",
expectedDebian: "/usr/local/bin/node",
expectedUbi: "/usr/bin/node",
expectedKitchen: "/opt/fnm/aliases/default/bin/node",
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/node",
},
{
name: "npm",
expectedDebian: "/usr/local/bin/npm",
expectedUbi: "/usr/local/bin/npm",
expectedKitchen: "/opt/fnm/aliases/default/bin/npm",
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/npm",
},

{
name: "yarn",
expectedDebian: "/usr/local/bin/yarn",
expectedUbi: "/usr/local/bin/yarn",
expectedKitchen: "/opt/fnm/aliases/default/bin/yarn",
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/yarn",
},
{
name: "corepack",
expectedDebian: "/usr/local/bin/corepack",
expectedUbi: "/usr/bin/corepack",
expectedKitchen: "/opt/fnm/aliases/default/bin/corepack",
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/corepack",
},
} {
testCase := testCase
Expand All @@ -335,7 +335,7 @@ func TestEnvironment(t *testing.T) {
// Install scripts for various tools can sometimes modify PATH, usually by adding entries
// to ~/.bashrc. This test ensures that we notice such modifications.
expectedPaths := map[string]string{
"pulumi": "/opt/fnm/aliases/default/bin:/usr/local/share/pyenv/shims:/usr/local/share/pyenv/bin:/usr/share/dotnet:/pulumi/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"pulumi": "/usr/local/share/fnm/aliases/default/bin:/usr/local/share/pyenv/shims:/usr/local/share/pyenv/bin:/usr/share/dotnet:/pulumi/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"pulumi-debian-dotnet": "/root/.dotnet:/pulumi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"pulumi-debian-go": "/pulumi/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"pulumi-debian-java": "/pulumi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
Expand Down

0 comments on commit cadd43b

Please sign in to comment.