Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that certificate files exist before trying to read them #46

Closed
mountaindude opened this issue May 7, 2022 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@mountaindude
Copy link
Contributor

Running stand-alone binary with default cert locations gives

➜  Downloads ./ctrl-q-cli master-item-import --host 192.168.100.109 --userdir LAB --userid goran --appid 2933711d-6638-41d4-a2d2-6dd2d965208b --loglevel verbose --file ./ctrl-q-cli-testdata.xlsx --sheet Sales --col-item-type "Master item type" --col-master-item-name "Master Item Name" --col-master-item-expr "Expression" --col-master-item-tag "Tag" --col-master-item-descr "Description" --col-master-item-label "Label" --limit-import-count 5
2022-05-07T19:39:43.072Z info: Import master items from definitions in Excel file "./ctrl-q-cli-testdata.xlsx"
2022-05-07T19:39:43.095Z error: Error: File '/**/ctrl-q-cli/src/lib/cert/client_key.pem' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:614:19)
    at readFileFromSnapshot (pkg/prelude/bootstrap.js:1006:29)
    at Object.readFileSync (pkg/prelude/bootstrap.js:1054:18)
    at readCert (/snapshot/ctrl-q-cli/src/lib/enigma.js)
    at RPC.createSocket (/snapshot/ctrl-q-cli/src/lib/enigma.js)
    at RPC.open (/snapshot/ctrl-q-cli/node_modules/enigma.js/enigma.js:1485:30)
    at Session.open (/snapshot/ctrl-q-cli/node_modules/enigma.js/enigma.js:754:41)
    at importMasterItemFromExcel (/snapshot/ctrl-q-cli/src/lib/importexcel.js)
    at importMasterItemFromFile (/snapshot/ctrl-q-cli/src/lib/importexcel.js)
    at Command.<anonymous> (/snapshot/ctrl-q-cli/src/ctrl-q-cli.js)
➜  Downloads
@mountaindude mountaindude added the enhancement New feature or request label May 7, 2022
@mountaindude mountaindude added this to the 2.1.0 milestone May 7, 2022
@mountaindude
Copy link
Contributor Author

Providing an absolute path to the cert files does work. Would be good to support relative paths too.

➜  Downloads ./ctrl-q-cli master-item-import --host 192.168.100.109 --userdir LAB --userid goran --appid 2933711d-6638-41d4-a2d2-6dd2d965208b --loglevel verbose --file ./ctrl-q-cli-testdata.xlsx --sheet Sales --col-item-type "Master item type" --col-master-item-name "Master Item Name" --col-master-item-expr "Expression" --col-master-item-tag "Tag" --col-master-item-descr "Description" --col-master-item-label "Label" --limit-import-count 5 --certfile /Users/goran/code/ctrl-q-cli/src/lib/cert/client.pem --certkeyfile /Users/goran/code/ctrl-q-cli/src/lib/cert/client_key.pem
2022-05-07T19:44:26.146Z info: Import master items from definitions in Excel file "./ctrl-q-cli-testdata.xlsx"
2022-05-07T19:44:26.230Z verbose: Created session to server 192.168.100.109, engine version is 12.1140.1.
2022-05-07T19:44:26.383Z verbose: Opened app 2933711d-6638-41d4-a2d2-6dd2d965208b.
2022-05-07T19:44:26.409Z info: Created new measure "No. of sold units"
2022-05-07T19:44:26.414Z info: Created new measure "No. of sold units (LY)"
2022-05-07T19:44:26.420Z info: Created new measure "Revenue EUR"
2022-05-07T19:44:26.425Z info: Created new measure "Revenue EUR (LY)"
2022-05-07T19:44:26.431Z info: Created new measure "Profit EUR"
2022-05-07T19:44:26.436Z verbose: Closed session after adding/updating master items in app 2933711d-6638-41d4-a2d2-6dd2d965208b on host 192.168.100.109
➜  Downloads

@mountaindude mountaindude removed this from the 2.1.0 milestone May 7, 2022
@mountaindude
Copy link
Contributor Author

Covered by #81 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant