From 834eb8ae6277724c145f66d3f00bc6828130eaea Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sun, 9 Feb 2025 16:35:16 -0800 Subject: [PATCH] Disregard cwd --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 63f3ef9..d0d6cde 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,9 @@ The process's environment is as follows: * Each environment variable defined in the source is set. * `STATE_PATH` is set to the absolute path of a file that the source can use for persistent state. This file can be used for any data in any format. Changes to the state file are only saved if the action succeeds. +The process inherits `intake`'s working directory, which may differ between CLI invocations and the service daemon. +Consequently, actions should use the state file for persistence and temporary directories for ephemeral files, rather than depending on the current working directory. + When an action receives an item as input, that item's JSON representation is written to that action's `stdin`. When an action outputs an item, it should write the item's JSON representation to `stdout` on one line. All input and output is assumed to be UTF-8. @@ -100,7 +103,6 @@ Parity features * [x] item punt * [x] web feed paging * [x] web fetch -* [ ] set a working directory for item actions * [ ] crontab integration * [ ] source batching * [x] add item from web