From 7097cf63192ef5c7c7831912a9c071b411a11860 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Sun, 27 Aug 2023 16:35:49 +0200 Subject: [PATCH] fix(admin-cli): Fixes immich-admin because npm bin does not like arguments (#3864) * fix admin cli * move script to bin, actually pass arguments * remove accidentally created package-lock.json --- server/bin/admin-cli.sh | 2 ++ server/package-lock.json | 2 +- server/package.json | 2 +- server/start.sh | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 server/bin/admin-cli.sh diff --git a/server/bin/admin-cli.sh b/server/bin/admin-cli.sh new file mode 100755 index 0000000000..b63e331eb0 --- /dev/null +++ b/server/bin/admin-cli.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +./start.sh admin-cli $1 diff --git a/server/package-lock.json b/server/package-lock.json index ae39e8b733..df1e0b9ab1 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -54,7 +54,7 @@ }, "bin": { "immich": "bin/cli.sh", - "immich-admin": "start.sh admin-cli" + "immich-admin": "bin/admin-cli.sh" }, "devDependencies": { "@nestjs/cli": "^9.1.8", diff --git a/server/package.json b/server/package.json index b4f135455d..4f79e2dc1c 100644 --- a/server/package.json +++ b/server/package.json @@ -7,7 +7,7 @@ "license": "UNLICENSED", "bin": { "immich": "./bin/cli.sh", - "immich-admin": "./start.sh admin-cli" + "immich-admin": "./bin/admin-cli.sh" }, "scripts": { "build": "nest build", diff --git a/server/start.sh b/server/start.sh index 10b473d9aa..5ec1a26432 100755 --- a/server/start.sh +++ b/server/start.sh @@ -32,4 +32,4 @@ if [ "$REDIS_PASSWORD_FILE" ]; then unset REDIS_PASSWORD_FILE fi -exec node dist/main $1 +exec node dist/main $@