gootik / rebar_cmd Goto Github PK
View Code? Open in Web Editor NEWA rebar plugin for running custom commands
License: Other
A rebar plugin for running custom commands
License: Other
If the command is a long running command with messages being streamed, you don't see anything until the command is done.
Instead of throwing errors, just return them and let rebar handle it upstream. It could show a nice error to the console instead of "something went wrong, use DEBUG=1..." message.
os:cmd handles many edge cases and in general is better.
I'm encountering an issue while using rebar3 cmd <command>
. With the transition to os:cmd/1
, I'm unable to retrieve the return code accurately to determine whether the command has failed or not.
I'm using this functionality in a GitHub Actions workflow for checks. Having access to the return code is crucial for proper workflow automation and error handling.
Consider the following simple example in my project's rebar.config
:
{commands, [
{example, "ls non_existent_directory", []},
]}.
The command ls non_existent_directory
always returns a return code of 1, indicating failure.
❯ ls non_existent_directory
ls: non_existent_directory: No such file or directory
❯ echo $?
1
However, when executed with rebar3 cmd example
the return code is erroneously reported as 0, causing GitHub checks to be marked as successful even in case of failure:
❯ rebar3 cmd example
ls: non_existent_directory: No such file or directory
❯ echo $?
0
It is weird typing rebar3 rebar_cmd
Gentle reminder.
If I have echo a; echo b
only the first echo runs.
Potential use-case is not clear from README and not clear for me right now.
Care to add some examples?
Would you be interested in a pull request that moves CI from Travis CI to GitHub Actions, or at least adds GitHub Actions alongside Travis CI? It seems travis-ci.org will stop being useful from Dec 31 2020. I can do it, except that I think you need to create the workflow yml, first, in master
, after which I can branch off of.
We need to figure out a solution for this and implement it.
build/default/plugins/rebar3_hex/src/rebar3_hex_user.erl:246: Warning: crypto:block_encrypt/4 is deprecated and will be removed in OTP 24; use use crypto:crypto_one_time/5, crypto:crypto_one_time_aead/6,7 or crypto:crypto_(dyn_iv)?_init + crypto:crypto_(dyn_iv)?_update + crypto:crypto_final instead
_build/default/plugins/rebar3_hex/src/rebar3_hex_user.erl:256: Warning: crypto:block_decrypt/4 is deprecated and will be removed in OTP 24; use use crypto:crypto_one_time/5, crypto:crypto_one_time_aead/6,7 or crypto:crypto_(dyn_iv)?_init + crypto:crypto_(dyn_iv)?_update + crypto:crypto_final instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.