From 4daf12199a8ca0666b2f37e8d0c755b94cf1ea63 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 29 Jun 2025 17:42:37 -0700 Subject: Minor fixes to argv parsing and docker base image --- Dockerfile | 5 ++--- u/process/argv.ts | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5c87c65..46231bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,10 +38,9 @@ COPY --from=laminar_bin /usr/share/bash-completion/completions/laminarc /usr/sha COPY --from=laminar_bin /usr/share/zsh/site-functions/_laminarc /usr/share/zsh/site-functions/_laminarc WORKDIR /app -COPY package*.json ./ -RUN npm ci --only=production - COPY . /app + +RUN npm ci RUN npm run build ENTRYPOINT [ "/bin/bash", "-c" ] diff --git a/u/process/argv.ts b/u/process/argv.ts index dca5098..396fa96 100644 --- a/u/process/argv.ts +++ b/u/process/argv.ts @@ -31,7 +31,9 @@ export const getArg = ( .flatMap((idx) => Optional.from(argv.at(idx)).map((_argv) => (_argv.includes('=') ? _argv.split('=')[1] : argv.at(idx + 1))), ) - .map((next) => (isArgKey(next) ? whenValue.unspecified : whenValue.present(next))) + .filter((next) => !isArgKey(next)) + .map((next) => whenValue.present(next)) + .orSome(() => whenValue.unspecified) .map((v) => Either.right(v)) .get(); }; -- cgit v1.2.3-70-g09d2