Skip to content

zed backup restore fails when using '-' for stdin #698

Description

@Juqsi

Description

Currently, zed backup restore fails when attempting to restore from stdin using the standard - argument. The command terminates with the following error:
unable to stat restore file: stat -: no such file or directory

While piping data without arguments works when stdin is not a terminal, explicitly passing - is a standard Unix convention that currently fails because openRestoreFile attempts to call os.Stat() on the literal string "-".

This should match the existing behavior of zed backup create - (implemented in #688), which handles the dash shorthand correctly.

Steps to Reproduce

cat backup | zed backup restore -

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions