You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the presence of the help command gets examined it is assumed that there's at least one CLI arg provided. When this is not the case, a crash occurs.
To Reproduce
RUN npm i @hyperledger/cactus-cmd-api-server@${NPM_PKG_VERSION} --production
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["node", "node_modules/@hyperledger/cactus-cmd-api-server/dist/lib/main/typescript/cmd/cactus-api.js"]
Expected behavior
No crash when there are no CLI args for the API server (since we can fully configure it through ENV or config file as well.
Logs/Stack traces
$ docker run --rm --publish 3000:3000 --publish 4000:4000 cas
[2021-04-14T05:07:15.560Z] INFO (config-service): Configuration validation OK.
[2021-04-14T05:07:15.561Z] ERROR (cactus-api): Cactus API server crashed: TypeError: Cannot read property 'includes' of undefined
at main (/usr/src/app/node_modules/@hyperledger/cactus-cmd-api-server/dist/lib/main/typescript/cmd/cactus-api.js:17:25)
at launchApp (/usr/src/app/node_modules/@hyperledger/cactus-cmd-api-server/dist/lib/main/typescript/cmd/cactus-api.js:30:15)
at Object.<anonymous> (/usr/src/app/node_modules/@hyperledger/cactus-cmd-api-server/dist/lib/main/typescript/cmd/cactus-api.js:40:5)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
Screenshots
N/A
Cloud provider or hardware configuration:
Dev machine
Operating system name, version, build:
Alpine Linux (container)
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
Guard against examinig the help command's presence if there's no
CLI arguments specified at all.
Fixeshyperledger-cacti#794
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Guard against examinig the help command's presence if there's no
CLI arguments specified at all.
Fixes#794
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Describe the bug
When the presence of the help command gets examined it is assumed that there's at least one CLI arg provided. When this is not the case, a crash occurs.
To Reproduce
Expected behavior
No crash when there are no CLI args for the API server (since we can fully configure it through ENV or config file as well.
Logs/Stack traces
Screenshots
N/A
Cloud provider or hardware configuration:
Dev machine
Operating system name, version, build:
Alpine Linux (container)
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
0.4.1
Hyperledger Cactus Plugins/Connectors Used
N/A
Additional context
N/A
cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton @AzaharaC @jordigiam @kikoncuo @jagpreetsinghsasan
The text was updated successfully, but these errors were encountered: