Page MenuHomePhabricator

[services] Clean up `run_server_image.sh`
ClosedPublic

Authored by abosh on Jun 29 2022, 8:10 AM.
Tags
None
Referenced Files
F3387323: D4398.id13979.vson.diff
Fri, Nov 29, 8:52 AM
Unknown Object (File)
Sun, Nov 3, 7:46 PM
Unknown Object (File)
Sun, Nov 3, 7:45 PM
Unknown Object (File)
Sun, Nov 3, 7:45 PM
Unknown Object (File)
Sun, Nov 3, 7:45 PM
Unknown Object (File)
Sun, Nov 3, 7:41 PM
Unknown Object (File)
Sun, Nov 3, 7:24 PM
Unknown Object (File)
Oct 25 2024, 6:51 AM
Subscribers

Details

Summary

Cleaned up run_server_image.sh with style fixes and some double quoting to safely prevent globbing and word splitting. More details in inline comments.

Test Plan

ShellCheck, close reading.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

services/scripts/run_server_image.sh
6

Changed this to "arguments" to match lines 7 and 9. Arguments seems to be the correct term for this use case (elements following the command/positional parameters), whereas parameters seems to describe something that can provide information to a flag or option. Either way, this should match what's on lines 7 and 9.

16

Use -n instead of ! -z. This is a style fix, but it's the equivalent of removing a double negation when not necessary (since -n checks to see if a string is non-empty).

20
24
32
ashoat requested changes to this revision.Jun 29 2022, 1:10 PM

Can we fix this up to use [[ ]] instead of [ ]? Context here

This revision now requires changes to proceed.Jun 29 2022, 1:10 PM
This revision is now accepted and ready to land.Jun 29 2022, 1:19 PM