xargs fix breaks nvim Conform usage #9

Closed
opened 2026-02-19 22:21:36 +00:00 by smark · 4 comments
Owner
No description provided.
Author
Owner

see #7

see #7
Author
Owner

Temporary fix:

diff --git a/composefmt/cli.py b/composefmt/cli.py
index dc1844d..3856af0 100755
--- a/composefmt/cli.py
+++ b/composefmt/cli.py
@@ -80,7 +80,7 @@ def main():
     )

     # handle STDIN if present
-    if helper.stdin_is_piped():
+    if not sys.stdin.isatty():
         file_content = helper.remove_empty_lines(sys.stdin)
         data = yaml.load(file_content)
         format_yaml(data, cfg.top_level_order, cfg.service_order)
Temporary fix: ```diff diff --git a/composefmt/cli.py b/composefmt/cli.py index dc1844d..3856af0 100755 --- a/composefmt/cli.py +++ b/composefmt/cli.py @@ -80,7 +80,7 @@ def main(): ) # handle STDIN if present - if helper.stdin_is_piped(): + if not sys.stdin.isatty(): file_content = helper.remove_empty_lines(sys.stdin) data = yaml.load(file_content) format_yaml(data, cfg.top_level_order, cfg.service_order) ```
Author
Owner

show file-mode:

    print("isatty:", os.isatty(fileno))
    print("CHR:", stat.S_ISCHR(mode))
    print("FIFO:", stat.S_ISFIFO(mode))
    print("REG:", stat.S_ISREG(mode))
show file-mode: ```python print("isatty:", os.isatty(fileno)) print("CHR:", stat.S_ISCHR(mode)) print("FIFO:", stat.S_ISFIFO(mode)) print("REG:", stat.S_ISREG(mode)) ```
Author
Owner

closed by 0608119

closed by 0608119
smark closed this issue 2026-02-20 09:37:59 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
docker/composefmt#9
No description provided.