-
Notifications
You must be signed in to change notification settings - Fork 3
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
YAML not working #44
Comments
Hi Radley, Thanks for reporting this. I have looked into it and I don't see any issue with the first thing that you mentioned. Binding there seems fine. But the second one was clearly wrong and the expanded home directory wasn't even used. So even though we expanded it, we were still used the original path. I have fixed this and will soon create a PR for review/release. A quick question, what OS are you using? |
Im using OSX El Capitan 10.11.2 I also pulled down the new file and tried using it. I'm still getting an error that API key ID and secret is required. I have put some logs in checking the state of the original file path and the expanded file path. Here are their results:
currently my YAML file resides here /Users/MY_USERNAME/workspace/MY_APP/stormpath.yml. (which would show that the final instance of the expandedDir being correct.) Could multiple trips through the process be affecting the result? side note: I've tried saving it as both .yaml and .yml file, neither are working |
I am noticing that the strategies are called with a config parameter, but this seems to be just a default object. Like when ValidateClientConfigStrategy is called, it has a fleshed out object, but the values like client.apiKey are null |
Nvm, it works thanks! |
Did you get it to work? Was it because of permissions to the file? |
It's working. I wrote the yaml without spaces between the colon and the value so it was getting parsed incorrectly. Really sorry about this. :\ |
No problem! Good to hear that you solved it! :) Closing this issue now. |
The loader strategy for LoadFileConfigStrategy.js is not working correctly. It basically isn't picking up my stormpath.yml file in the main folder for my app. This seems to be because it isn't looking in the correct filepath for the stormpath.yml. There are 2ish main reasons/files associated for this(I think):
Function - ConfigLoader.prototype.load
Line - 73) tasks.push(strategies[i].process.bind(strategies[i]));
Function - LoadFileConfigStrategy.prototype.process
Line - 24) var filePath = expandHomeDir(this.filePath);
The base problem is that the filepath is not being expanded correctly(though i think expandHomeDir is doing what you want). I can't tell if this is because the state has been bound in an incorrect way or if the LoadFileConfigStrategy needs to do something different. There also seems to be some inconsistencies in the way things are used: for instance why check fs.exists(this.filePath) and then read from fs.readFile(filePath).
I also realize that this could all be correct and it's some async error i haven't accounted for.
The text was updated successfully, but these errors were encountered: