Nick Mills-Barrett

Results 277 comments of Nick Mills-Barrett

Aha, so the extra flags only seem to be applied to the sed part, not passed to the grep fact here: https://github.com/pyinfra-dev/pyinfra/blob/6fa182dfde25ba64e65bc895b31c2ef40bc43201/pyinfra/operations/files.py#L524-L529 Which makes this complicated because the `flags` argument...

> it seems that it's only possible to provide extra positional arguments by using Protocol with __call__ and ParamSpec. So unless one specifies all the extra arguments (i.e. _sudo/_sudo_user/_use_sudo_login/...), it's...

Nice catch! So the table printing is… super basic, I hacked it together and never looked at it since, would definitely be improved using something more robust like rich.

I believe this to be safe because this is what happens when you pipe things `echo hi | sleep 500` leaves sleep process w/o any echo.

Looks like an unfortunate side effect of moving to `uv-dynamic-version`. There is a hack here which should at least get the build working: https://github.com/ninoseki/uv-dynamic-versioning/issues/64 Choices seem to be: a) stick...

The error seems to be removing the file with sudo, based on this line: ``` [rockpi.home.arpa] >>> sudo -H -n sh -c 'rm -f /tmp/user/0/pyinfra-a302f6cd8526066f2904619397ee54c2660d795a' ``` The copy to that...

Hi @matof sorry for the delay - this is triggering https://github.com/pyinfra-dev/pyinfra/blob/3.x/src/pyinfra/api/operation.py#L269 - a quick fix for you would be to call `state.set_stage(StateStage.Prepare)`. This was mistakenly not gated to CLI mode...

Another option would be setting `config.TEMP_DIR` (https://github.com/pyinfra-dev/pyinfra/blob/a43146afc6a3c2b34078b74651a81f89e5c7c02b/src/pyinfra/api/config.py#L28). But I think a nicer option would be an additional `_temp_dir` global argument (which would fallback to the config).

Heh... #146. Worth re-investigating I think, given the [slowly groing number of issues w/paramiko](https://github.com/pyinfra-dev/pyinfra/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22dependency%20issue%22) and upstream dev is v.slow. The library itself is also slow! https://github.com/ParallelSSH/ssh2-python looks solid, and is...

The expected behaviour is: - if no file, return `None` - if empty file, return `""` The `FindInFile` fact solved this same problem already: https://github.com/pyinfra-dev/pyinfra/blob/3.x/src/pyinfra/facts/files.py#L431. Basically we echo a specific...