ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

conditionals: allow keys in then/else of assignment #522

Closed markus2330 closed 8 years ago

markus2330 commented 8 years ago
[powersaving/gps]
assign/condition = (device != 'vehicle') ?  (battery/level) : ('full')

leads to

Using name user/example/highlevel/powersaving/gps
Set string to full
The command set failed while accessing the key database with the info:
Error (#134) occurred!
Description: Syntax error
Ingroup: plugin
Module: conditionals
At: /home/jenkins/workspace/workspace/elektra-git-buildpackage-jessie/libelektra/src/plugins/conditionals/conditionals.c:376
Reason: Invalid syntax: "battery/level". Check kdb info conditionals for additional information

Mountpoint: user/example/highlevel
Configfile: /home/markus/.config/highlevel.ini.8639:1455571677.214324.tmp

expected: battery/level should be a key to lookup

tom-wa commented 8 years ago

@markus fixed in #540

markus2330 commented 8 years ago

Thank you, works fine now!