fpaste: fix -E flag with piped stdin
Some checks failed
CI / Lint & Format (push) Failing after 15s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 21s

This commit is contained in:
Username
2025-12-20 18:22:59 +01:00
parent a2c5a013ef
commit 9e92db5217

6
fpaste
View File

@@ -753,8 +753,10 @@ def main():
break break
i += 1 i += 1
# Insert "create" before file path if no command found # Insert "create" if no command found and we have input
if not has_command and file_pos >= 0: # (either a file path or piped stdin)
if not has_command:
if file_pos >= 0 or not sys.stdin.isatty():
args_to_parse.insert(insert_pos, "create") args_to_parse.insert(insert_pos, "create")
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(