Commit 296a21d
fix(docs): make Linux tar log-collection commands actually work (#36)
Closes #16.
The Linux tar commands in 'Gathering Warp Logs' fail with 'tar: warp.log*:
Cannot stat: No such file or directory' on Linux: bash leaves the
unmatched literal 'warp.log*' as the file argument to tar, and tar then
looks for a literal file named 'warp.log*' inside the -C directory.
Switch to 'cd into the directory first, then tar' so the shell expands
the glob in the right pwd. Wrap the cd+tar in subshell parens so the
user's pwd is preserved after the command finishes (the cd only affects
the subshell).
Verified with GNU tar 1.35 + bash:
- OLD command reproduces the reporter's failure (exit=2,
'Cannot stat: No such file or directory').
- NEW command exits 0 and archives warp.log, warp.log.1, warp.log.2.
- Caller's pwd is unchanged after the subshell exits.
(Earlier draft of this fix used GNU tar's --wildcards flag, but
--wildcards only enables glob matching during EXTRACTION/listing; in
creation mode tar still treats arguments as literal paths. Reverted
to the cd-then-tar approach the issue reporter suggested.)
Also normalize the indentation in the Linux :::caution RUST_LOG block
to the 4-space indent already used by the macOS and Windows tabs.
Co-authored-by: Oz <oz-agent@warp.dev>1 parent facb617 commit 296a21d
1 file changed
Lines changed: 5 additions & 5 deletions
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
0 commit comments