fpaste: fix -E flag with piped stdin
This commit is contained in:
6
fpaste
6
fpaste
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user