[ 
https://issues.apache.org/jira/browse/KARAF-7555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17650090#comment-17650090
 ] 

Jean-Baptiste Onofré commented on KARAF-7555:
---------------------------------------------

Actually, I don't reproduce the issue.

Here's my test (both with Karaf 4.3.7 and 4.4.3-SNAPSHOT):

 
 # I define a environment variable:

{code:java}
export FOO=test {code}
2. I create {{etc/net.nanthrax.test.cfg}} file containing:
{code:java}
foo=${env:FOO} {code}
3. I'm starting Karaf and I do:
{code:java}
karaf@root()> config:list "(service.pid=net.nanthrax.test)"
----------------------------------------------------------------
Pid:            net.nanthrax.test
BundleLocation: ?
Properties:
   felix.fileinstall.filename = 
file:/Users/jbonofre/Downloads/apache-karaf-4.3.7/etc/net.nanthrax.test.cfg
   foo = test
   service.pid = net.nanthrax.test {code}
You can see {{foo}} value is {{test}} corresponding to the environment variable 
value.

> config-list and service-list do not interpolate ${env:..} values
> ----------------------------------------------------------------
>
>                 Key: KARAF-7555
>                 URL: https://issues.apache.org/jira/browse/KARAF-7555
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.3.7
>            Reporter: Matt Pavlovich
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> When a config value is set to use an environment variable, config:list and 
> service:list commands do not interpolate for ${env:FOO}
> For given config file:
> {noformat}
> bar = ${env:HOSTNAME}
> {noformat}
> {noformat}
> karaf@root()> config:list "(service.pid=org.foo)"                             
>                                                                               
>                                                                               
> ----------------------------------------------------------------              
>                                                                               
>                        
> Pid:            org.foo
> BundleLocation: ?
> Properties:
>    bar = 
>    felix.fileinstall.filename = file:/..../etc/org.foo.cfg
>    service.pid = org.foo
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to