diff options
-rw-r--r-- | Dockerfile | 5 | ||||
-rw-r--r-- | u/process/argv.ts | 4 |
2 files changed, 5 insertions, 4 deletions
@@ -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 = <K extends string, V>( .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<Error, V>(<V>v)) .get(); }; |