diff options
| author | Teddy Wing | 2018-04-19 00:02:18 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-04-19 00:03:31 +0200 |
| commit | ca360a1ea65f6e01de2f99a279ecd8d312c412ab (patch) | |
| tree | d7a5f3b84774f23078f61515a5e15b5f6c7117ea | |
| parent | 5382bef7e53a06a4b2b7148b099f73382a5bbd09 (diff) | |
| download | redprine-ca360a1ea65f6e01de2f99a279ecd8d312c412ab.tar.bz2 | |
preflight(): Initialise cache file
If no cache file is present, `new_pull_requests()` should fail. To allow
it to continue to function even in the absence of a cache file,
initialise the cache file with an empty JSON array.
| -rwxr-xr-x | redprine | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -187,6 +187,10 @@ function exit_with_error () { function preflight () { mkdir -p "$REDPRINE_DATA_DIR" + + if [ ! -f "$CACHE_FILE" ]; then + echo '[]' > "$CACHE_FILE" + fi } function argument_error () { |
