Opened 8 months ago

Last modified 8 months ago

#33603 new task

Catch common errors in tor bash scripts

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor:

Description (last modified by teor)

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.

Child Tickets

Change History (2)

comment:1 Changed 8 months ago by teor

Description: modified (diff)

comment:2 Changed 8 months ago by teor

Summary: Catch common errors in bash scriptsCatch common errors in tor bash scripts
Type: enhancementtask
Note: See TracTickets for help on using tickets.