fix(cli): filter out --http flag for superuser creation command

This commit is contained in:
lukashow
2026-02-07 21:02:55 +08:00
parent af494da720
commit 0945b8d436

View File

@@ -34,7 +34,8 @@ export function createPocketBaseSuperuser(
try {
const result = executeCommand(
`${PB_BINARY_PATH} superuser create ${PB_KWARGS.join(' ')}`,
// Remove flags with --http flag because PocketBase don't take http flag for superuser creation
`${PB_BINARY_PATH} superuser create ${PB_KWARGS.filter(flag => !flag.startsWith('--http')).join(' ')}`,
{},
[email, password]
)