-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Failing context operations like add, use, list, etc. #751
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
we need to make sure, maybe nothing is added to context, as the |
oh alright. updated the issue a little bit to include a correct spec file as the argument to the command |
@aeworxet hey any ideas? |
update on this issue. The command works perfectly fine if I'm building cli locally and then using it as:
|
@AnishKacham when you tested a binary, how did you install it? |
Yes. That is indeed how I installed asyncapi cli. the |
getting the same with binary installed over npm: $ asyncapi --version
@asyncapi/cli/0.52.3 darwin-x64 node-v16.13.0
$ asyncapi config context init
Initialized context /{...}/template-for-generator-templates-asyncapi-fork/.asyncapi-cli
$ cat .asyncapi-cli
{"store":{}}
$ asyncapi config context add dummy test/fixtures/dummy.yml
You have no context file configured. Run "asyncapi config context init" to initialize it. |
@derberg @AnishKacham |
host Win11 " as discovered by @derberg I've checked this and it seems like it is the issue. |
I was able to reproduce this issue only when I ran in
If I rebuild locally and run
everything works.
UPD.
in the root of cloned |
I have narrowed the search for this bug. |
oh lovely, we at least can reproduce now on local. The |
just opened a PR with fix that should solve the problem, at least works on my machine 😄 |
Works on my machine too. |
Yess. That works as expected on my machine. 🎉 |
The code works on three machines in different tech environments, in three different states. Should be good to merge. |
Context operations do not work even after initializing context
How to Reproduce
Create an empty directory, and spin up a sample asyncapi spec document.
for this I used the sample mentioned in the docs :
asyncapi config context init
you should see a
.asyncapi-cli
file get created with the following content:now running
asyncapi config context add foo ./asyncapi.yaml
gives the following message even if context is initialized alreadyScreenshots
Link to GitHub repository with project that has issues
Expected behavior
.asyncapi-cli
fileThe text was updated successfully, but these errors were encountered: