-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature Request - allow alias to be run using infisical run #457
Comments
Great idea! |
Hey @maidul98, I looked into this. A quick fix would be to check if the command exists in %PATH% (alias check), get the 'SHELL' environment variable and run the command as a sub command. ( In infisical/cli/packages/cmd/run.go Line 188 in a3093de
Eg: '[SHELL] -c [aliasCmd]' for git bash: '[/path/to/bash] -c [aliasCmd]' However aliases aren't passed to sub processes. As a work around, in substitute for aliases, you could create a function in your .bashrc / bash_profile.sh which returns the cmd you're aliasing and export it. |
Is help still needed on this issue? I would love to work on it! |
@quinton11 that makes sense and to source the file you can also just point to a script file. This way we can do something like this which already works out of the box
where myfunctions.sh is
I think adding this to the documentation should help others become aware of this. What do you think @parthvnp @quinton11 |
Yep, sounds great... would you handle updating the documentation? I can pick it up if not. Or perhaps @parthvnp ? |
I can handle the updating documentation ! |
Cool, we use https://mintlify.com/ so feed free to cd into the docs folder and start up mintlify with |
Feature description
I would like to be able to using: infisical run to run an alias
infisical run -- rcxx-preprod blind
rccno-prepod is the following alias:
alias rcxx-preprod='./runners/runit.chrome.cxx-preprod.sh'
When running rcnno-preprod, it will be expanded to:
testcafe 'chrome --start-fullscreen' --cfg=cxx-preprod.json ./test/blind-man-navigation.js
Why would it be useful?
To have shortcut to long commands
Right now what you get is this error:
Environment
gitbash on windows 11
The text was updated successfully, but these errors were encountered: