Skip to content

[Bug] Shim breaks interoperability between restic and rclone #4849

Closed
@Zottelchen

Description

Bug Report

Current Behavior

When attempting to use restic backups with rclone (both installed via scoop) it does not work with error messages like:
Fatal: unable to open repo at rclone:onedrive:snapshot: error talking HTTP to rclone: Get "http://localhost/file-5577006791947779410": unexpected EOF

Expected Behavior

restic should be able to work, like it does with a non-scoop install.

Additional context/output

Scoop is "shimming" apps installed via https://github.com/ScoopInstaller/Shim/blob/master/src/shim.cs . However, for unknown reason, the stdin/stdout handles which should be inherited from shim process (set by restic by redirecting) aren't passed to rclone process properly if shim process is started with DETACHED_PROCESS. Even when I modified shim.cs to manually pass handles, the issue persists. I observed that a blank console window flashed which may indicate a new console was allocated.

Originally posted by @cqjjjzr in restic/restic#3681 (comment)

Possible Solution

System details

Windows version: 10

OS architecture: 64bit

PowerShell version: 5.1.19041.1320

Additional software: restic, rclone

Scoop Configuration

{
    "lastupdate":  "2022-03-28T14:42:06.1230313+02:00",
    "SCOOP_REPO":  "https://github.com/lukesampson/scoop",
    "SCOOP_BRANCH":  "master"
}

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions