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

cmd step: support ~ & env #270

Open
yaythomas opened this issue Mar 14, 2022 · 1 comment
Open

cmd step: support ~ & env #270

yaythomas opened this issue Mar 14, 2022 · 1 comment
Labels
enhancement new features type: step steps

Comments

@yaythomas
Copy link
Member

pypyr.steps.cmd doesn't support ~ expansion or $ENV vars in its cmd input.

Easy enough to add. Then operators won't have to go and invoke the more inefficient pypyr.steps.shell just for doing something like:

- name: pypyr.steps.cmd
   in:
     cmd: cp ~/mypath ~/myoutpath

Note that $ENV expansion supports formats $ENV and ${ENV}. It leaves unrecognised tokens alone, meaning pypyr can do a {substitution} format afterwards without breaking anything.

@yaythomas yaythomas added enhancement new features type: step steps labels Mar 14, 2022
@yaythomas yaythomas added this to To do in pypyr roadmap via automation Mar 14, 2022
@yaythomas
Copy link
Member Author

The Python ~ expandUser func is pretty inefficient, and it'd have to run for each arg in cmd inputs args. . .

Might be better to create a step to write {HOME} into context and use that as a standard formatting expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features type: step steps
Projects
pypyr roadmap
  
To do
Development

No branches or pull requests

1 participant