Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,22 @@ $ duct --log-level DEBUG echo "hello world"
By default, [git-annex](https://git-annex.branchable.com/) treats all dotfiles, and files under directories starting with a `.` as "small" regardless of `annex.largefiles` setting [[ref: an issue describing the logic](https://git-annex.branchable.com/bugs/add__58___inconsistently_treats_files_in_dotdirs_as_dotfiles/?updated#comment-efc1f2aa8f46e88a8be9837a56cfa6f7)].
It is necessary to set `annex.dotfiles` variable to `true` to make git-annex treat them as regular files and thus subject to `annex.largefiles` setting [[ref: git-annex config](https://git-annex.branchable.com/git-annex-config/)].
Could be done the repository (not just specific clone, but any instance since records in `git-annex` branch) wide using `git annex config --set annex.dotfiles true`.

### My command behaves differently under duct (`goaccess` fails, `tqdm` "freezes", progress bars look wrong)

duct starts the wrapped command in a new session (`start_new_session=True`), so the child has no controlling terminal, and duct attaches pipes to its stdout/stderr instead of a PTY.
Programs that inspect `isatty()` to decide how to behave will therefore take their non-interactive path under duct.
Comment thread
asmacdo marked this conversation as resolved.
Outdated
Comment thread
asmacdo marked this conversation as resolved.
Outdated
Two common cases:

- [`goaccess`](https://goaccess.io) refuses to read piped stdin without an explicit `-` argument and exits with `No input data was provided` [[ref: con/duct#261](https://github.com/con/duct/issues/261)].
Comment thread
asmacdo marked this conversation as resolved.
Outdated
Pass `-` (e.g. `... | goaccess - --log-format=AWSS3 -o report.html`) to force stdin mode.
- [`tqdm`](https://tqdm.github.io) drops `\r`-overwrite redraws and switches to its rate-limited non-TTY path, so updates print one line at a time and arrive in bursts seconds apart — it looks like the bar has frozen [[ref: con/duct#426](https://github.com/con/duct/issues/426)].
Tune `mininterval`/`maxinterval`/`miniters` on the `tqdm()` call, or pass `disable=False` together with the rate options, to get more frequent output in log mode.

To check whether a given problem is a TTY issue and not a duct bug, reproduce it outside duct with `setsid`, which similarly detaches the controlling terminal:

```bash
setsid bash -c "your command here" < /dev/null > out.log 2>&1
```
Comment thread
asmacdo marked this conversation as resolved.

If the symptom reproduces under `setsid`, develop and test the non-interactive flag set there; the command will then behave the same way under duct.
Loading