What are the good and bad health effects of coffee?

Coffee is a drink made fro#coffeem coffee beans, which are the roasted fruit of the Coffea arabica bush. People drink coffee to relieve mental and physical fatigue and to increase mental alertness…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Make a shell command always succeed

In bash and many other shells, zero is called successful exit status code, whereas any non-zero codes are failure exit codes. That is to say when a command returns exit code of zero, it’s considered successful; otherwise, it’s considered a failure.

In some situations, one want to make sure a command always return zero, ignoring potential failures. This can be done with the true command:

The most recent example is in our CI, there is a step to upload code coverage report to codecov.io, but unfortunately their site has been flaky over the past couple weeks, which might cause otherwise successful builds to fail. In this case, we try to upload code coverage report, but if it fails for whatever reason, it’s okay to ignore. So the true command to the rescue:

where .codecov is the script for uploading the report.

Add a comment

Related posts:

The Bull

The sun was out and the day was hot. The bull stood in the grass like he did most days. It rained that morning and now the air was thick with steam and humidity as the mud filled field dried. The…

Viral Video Collectibles as an NFT Asset Class

Collecting Viral Video NFTs is an interesting sub-culture with a niche yet strong community behind it. Everyone has their own definition of virality — we define it as videos that have gained…

Olho por olho

Para fins de contextualização irei seguir uma ordem cronológica e não psicológica dos fatos. Se ainda houver alguma dúvida ao fim, faço algumas edições já que este relato servirá apenas para fins de…