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

ctx.changes('system') does not load configuration into cursor #188

Closed
pony1k opened this issue Feb 20, 2024 · 0 comments · Fixed by #190
Closed

ctx.changes('system') does not load configuration into cursor #188

pony1k opened this issue Feb 20, 2024 · 0 comments · Fixed by #190

Comments

@pony1k
Copy link

pony1k commented Feb 20, 2024

Hi!

Simple example:

import { cursor } from 'uci';

let ctx = cursor();
//ctx.get('system','a','a');
ctx.changes('system');
let name = ctx.add('system', 'foo');
print(name+'\n');

It prints null, unless the line ctx.get('system','a','a'); is uncommented. The documentation states that the requested configuration is implicitly loaded if it not already loaded into the cursor.

ucode version: 2023-11-07-a6e75e02-1

jow- added a commit that referenced this issue Feb 21, 2024
When invoked with an explicit package name argument, retain the autoloaded
configuration within the context state.

Fixes: #188
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
@jow- jow- closed this as completed in #190 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant