Skip to content

Consider expanding env vars while using request options #291

@kedarmhaswade

Description

@kedarmhaswade

Although we have our own name: ${name:value} mechanism implemented in yab, can we consider the values for the variables as a merge of env vars and those that are specified on the command line (command line taking the precedence)? I miss the expansion of ${HOME} to the path of my home folder.

Example yab

#!/usr/bin/env yab

service: hello
timeout: 2h
peer: localhost:6707
method: Hello::greet
#thrift: /Users/joe/gocode/src/idl/hello.thrift
thrift: ${HOME}/gocode/src/idl/hello.thrift
request:
    actorID: ${actorID:[email protected]}

Somewhat unexpected error

➜  yabs ./is-super-admin.yab -A "actorID: [email protected]"
Failed while parsing input: cannot find Thrift file: "/Users/joe/yabs/${HOME}/gocode/src/idl/hello.thrift"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions