mirror of
https://github.com/restic/restic.git
synced 2025-03-16 00:00:05 +01:00
Allow --files-from to take a dash (-) for stdin #769
This commit is contained in:
parent
22f3e21266
commit
64917639ef
1 changed files with 6 additions and 1 deletions
|
@ -28,7 +28,12 @@ The "backup" command creates a new snapshot and saves the files and directories
|
|||
given as the arguments.
|
||||
`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if backupOptions.Stdin {
|
||||
stdinDeclaredTwice := backupOptions.Stdin && backupOptions.FilesFrom == "-"
|
||||
if stdinDeclaredTwice {
|
||||
return errors.Fatal("unable to use argument '-' and stdin flag together")
|
||||
}
|
||||
|
||||
if backupOptions.Stdin || backupOptions.FilesFrom == "-" {
|
||||
return readBackupFromStdin(backupOptions, globalOptions, args)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue