[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #33603 [Core Tor/Tor]: Catch common errors in bash scripts
#33603: Catch common errors in bash scripts
--------------------------+----------------------------------
Reporter: teor | Owner: (none)
Type: enhancement | Status: new
Priority: Medium | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points: 1
Reviewer: | Sponsor:
--------------------------+----------------------------------
Description changed by teor:
Old description:
> Let's gradually convert our scripts to use:
> {{{
> set -e
> set -u
> set -o pipefail
> }}}
>
> And maybe:
> {{{
> IFS=$'\n\t'
> }}
>
> These settings help catch common errors in bash scripts at runtime:
> http://redsymbol.net/articles/unofficial-bash-strict-mode/
>
> (Shellcheck helps us catch errors while writing scripts, but it can't
> help with runtime failures.)
>
> Follow-up to #33451.
New description:
Let's gradually convert our scripts to use:
{{{
set -e
set -u
set -o pipefail
}}}
And maybe:
{{{
IFS=$'\n\t'
}}}
These settings help catch common errors in bash scripts at runtime:
http://redsymbol.net/articles/unofficial-bash-strict-mode/
(Shellcheck helps us catch errors while writing scripts, but it can't help
with runtime failures.)
Follow-up to #33451.
--
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33603#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs