Commit 90aae7b
committed
Fix hijack.sh sudo() to use an array, support whitespace and behave
Overriden commands should work exactly like real commands and support
whitespace and special characters exactly like the real command.
I usually disable the sudo() override locally when using `set -x`
to reduce trace noise considerably. The previous difference between the
sudo() override and the built-in sudo() cost me couple hours twice:
- WIP #897 (comment)
- Merged commit 232d40a
No more!
Also fix the return value: 2 means SKIP.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>1 parent bbcca01 commit 90aae7b
2 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
183 | | - | |
| 185 | + | |
| 186 | + | |
184 | 187 | | |
185 | | - | |
| 188 | + | |
| 189 | + | |
186 | 190 | | |
187 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
191 | | - | |
| 197 | + | |
192 | 198 | | |
193 | | - | |
194 | 199 | | |
195 | 200 | | |
196 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments