Skip to content

User-defined variables on command line? #408

@halpomeranz

Description

@halpomeranz

This is a really weird idea. Feel free to tell me I'm out of my mind.

Suppose I wanted to create a new artifact definition that had behavior that I wanted to be able to control from the UAC command line. For example, I recently submitted a feature request for a command line switch to limit the memory size of systems we would collect memory from (e.g., "Don't collect memory if the system has more than 64GB of RAM"). I think that one is generically useful enough to create a special command line switch for.

But I'm thinking about more specific use cases, where an investigation might create a custom module for a specific artifact. It might be useful to have a command-line parameter to control that artifact. But it's such a specific use case that it's not worth modifying the core UAC code to support this parameter with its own unique command line switch.

But perhaps uac could allow something like --define myvar=someval (or -D myvar=someval) and then expose that variable to artifacts as %myvar% or perhaps %USER_myvar% to avoid collisions for existing runtime variables.

I'm trying to figure out if this is a common enough use case to make implementing it worthwhile. It might be helpful for testing proof-of-concept modules in addition to the kind of special case uses I describe above.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions