New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup tahoe module #25271
Cleanup tahoe module #25271
Conversation
- Remove useless escape of question mark - Fix and quoting - Add some '&&s' for correctness
@0xABAB, thanks for your PR! By analyzing the history of the files in this pull request, we identified @MostAwesomeDude, @ericsagnes and @fpletz to be potential reviewers. |
Can you elaborate on how |
@joachifm Using |
The |
@joachifm I was not aware of that, but I also don't want to be aware of that. Global assumptions are bad. I consider running with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -237,22 +237,22 @@ in | |||
# arguments to $(tahoe start). The node directory must come first, | |||
# and arguments which alter Twisted's behavior come afterwards. | |||
ExecStart = '' | |||
${settings.package}/bin/tahoe start ${nodedir} -n -l- --pidfile=${pidfile} | |||
${settings.package}/bin/tahoe start "${nodedir}" -n -l- --pidfile="${pidfile}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If nodedir
or pidfile
include "
or $
, this still won't be interpreted correctly. If we really want to fix this properly, I think it would be better to use escapeShellArg
in the Nix interpolation, e.g.:
${lib.escapeShellArg pidfile}
(without double-quotes around it, and assuming lib is in scope). I'm not sure if it's worth the verbosity, but that would be the most solid way to do it.
Make sure people can't inject shell code by accident.
@ryantrinkle Thanks for your contribution. |
@joachifm I made the requested changes and then some. Please merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I found a typo.
mkdir -p /var/db/tahoe-lafs | ||
tahoe create-introducer ${nodedir} | ||
tahoe create-introducer "{lib.escapeShellArg nodedir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
Applied with a patch in 90acbe5 |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)