Skip to content

Don't use truncate in gitserver tests

Warren Gifford requested to merge 14962-replace-truncate into main

Created by: flying-robot

@unknwon pointed out that truncate is not guaranteed to be available (e.g macOS), so this swaps that out for a builtin redirection that will accomplish the same thing:

$ echo 'hello' > hello.txt
$ cat hello.txt
hello
$ : > hello.txt
$ cat hello.txt

ref https://github.com/sourcegraph/sourcegraph/pull/14962#discussion_r510291290

Merge request reports

Loading