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

Unable to find apiKey.properties file when ~ is used #28

Closed
typerandom opened this issue Jan 29, 2016 · 0 comments
Closed

Unable to find apiKey.properties file when ~ is used #28

typerandom opened this issue Jan 29, 2016 · 0 comments
Labels

Comments

@typerandom
Copy link
Contributor

Fixes a issue where an API key wouldn't be loaded correctly from a home path.

How to reproduce

  1. Checkout the stormpath-config master branch.
  2. Execute $ npm link to make it available as a link.
  3. Create an empty test project folder (e.g. stormpath-config-test) and $ cd into it.
  4. Execute $ npm init --yes.
  5. Execute $ npm link stormpath-config so that we link to our stormpath-config master branch.
  6. Create a new file called app.js and put the contents of this gist in it.
  7. Create an apiKey.properties with the following content and put it in the ~/.stormpath/ directory.
  8. Run $ node app.js.

Actual

Console outputs:

[Error: Client API key file not found: /Users/orhedenr/.stormpath/apiKey.properties] undefined

Expected

Console outputs:

null { bob: 123, client: { apiKey: { id: 'abc', secret: 'def' } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants