[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #31550 [Applications/Tor Browser]: Fix shellcheck (and related) issues in start-tor-browser
#31550: Fix shellcheck (and related) issues in start-tor-browser
-------------------------------------------+-------------------------------
Reporter: nickm | Owner: nickm
Type: enhancement | Status:
| needs_revision
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-tbm, TorBrowserTeam201910 | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------+-------------------------------
Changes (by boklm):
* keywords: tbb-tbm, TorBrowserTeam201910R => tbb-tbm,
TorBrowserTeam201910
* status: needs_review => needs_revision
Comment:
In the first patch:
{{{
@@ -204,13 +203,13 @@ if [ -L "$myname" ]; then
# make that function accessible to shell scripts.
# If realpath is available, use it; it Does The Right Thing.
- possibly_my_real_name="`realpath "$myname" 2>/dev/null`"
- if [ "$?" -eq 0 ]; then
+ if myname="$(realpath "$myname" 2>/dev/null)"; then
myname="$possibly_my_real_name"
else
# realpath is not available; hopefully readlink -f works.
- myname="`readlink -f "$myname" 2>/dev/null`"
- if [ "$?" -ne 0 ]; then
+ if myname="$(readlink -f "$myname" 2>/dev/null)"; then
+ :
+ else
# Ugh.
complain "start-tor-browser cannot be run using a
symlink on this operating system."
fi
}}}
We are removing the line creating the variable `possibly_my_real_name`,
but we are still using it with `myname="$possibly_my_real_name"` inside
the `if`, so it does not look correct.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31550#comment:6>
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