Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Bug] "scoop install \path\to\app.json" doesn't work for paths with spaces.

Open juliomaranhao opened this issue 1 year ago • 0 comments

Bug Report

Current Behavior

scoop install \path\to\app.json doesn't work for paths with spaces.

Expected Behavior

Should it work with spaces? Maybe I don't know quotaion rules in a PS console.

Additional context/output

$ C:\Users\Me> scoop install "j:\0 Q\tmp\freefilesync.json"
Couldn't find manifest for 'j:\0'.
$ C:\Users\Me> scoop install "j:\0` Q\tmp\freefilesync.json"
Couldn't find manifest for 'j:\0'.
$ C:\Users\Me> scoop install 'j:\0 Q\tmp\freefilesync.json'
Couldn't find manifest for 'j:\0'.
$ C:\Users\Me> scoop install 'j:\0` Q\tmp\freefilesync.json'
Couldn't find manifest for 'j:\0`'.
$ C:\Users\Me> scoop install '"j:\0 Q\tmp\freefilesync.json"'
Couldn't find manifest for 'j:\0'.
$ C:\Users\Me> scoop install "j:\\0 Q\\tmp\\freefilesync.json"
WARN  error: Could not find file 'j:\0'.
Couldn't find manifest for '0'.
$ C:\Users\Me> cd 'j:\0 Q\tmp'
$ j:\0 Q\tmp> ls

    Directory: j:\0 Q\tmp

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          02/11/2023    03:16       22331322 FreeFileSync_13.1_Windows_Portable.zip
-a---          02/11/2023    04:34           1449 freefilesync.json

$ j:\0 Q\tmp> scoop cat freefilesync.json
{
    "version": "13.1",
    "description": "Open Source folder comparison and synchronization software",
    "homepage": "https://freefilesync.org",
    "license": "GPL-3.0-only",
    "url": "J:\\0 Q\\tmp\\FreeFileSync_13.1_Windows_Portable.zip",
    "hash": "dc50a8025b14ed6b0dddd379d7e1eb6810f868f0ffbf41d2600cfe26e2354791",
    "pre_install": [
        "if (Test-Path \"$persist_dir\\GlobalSettings.xml\") { ",
        "    Copy-Item \"$persist_dir\\GlobalSettings.xml\" \"$dir\" ",
        "}",
        "if (Test-Path \"$persist_dir\\LastRun.ffs_gui\") { ",
        "    Copy-Item \"$persist_dir\\LastRun.ffs_gui\" \"$dir\" ",
        "}",
        "if (Test-Path \"$persist_dir\\Install.dat\") { ",
        "    Copy-Item \"$persist_dir\\Install.dat\" \"$dir\" ",
        "}"
    ],
    "uninstaller": {
        "script": [
            "if (Test-Path \"$dir\\GlobalSettings.xml\") { ",
            "    Copy-Item \"$dir\\GlobalSettings.xml\" \"$persist_dir\" -Force ",
            "}",
            "if (Test-Path \"$dir\\LastRun.ffs_gui\") { ",
            "    Copy-Item \"$dir\\LastRun.ffs_gui\" \"$persist_dir\" -Force ",
            "}",
            "if (Test-Path \"$dir\\Install.dat\") { ",
            "    Copy-Item \"$dir\\Install.dat\" \"$persist_dir\" -Force ",
            "}"
        ]
    },
    "bin": [
        "freefilesync.exe",
        "realtimesync.exe"
    ],
    "shortcuts": [
        [
            "freefilesync.exe",
            "FreeFileSync"
        ],
        [
            "realtimesync.exe",
            "RealTimeSync"
        ]
    ],
    "persist": "dummy"
}
$ j:\0 Q\tmp> scoop install freefilesync.json
Installing 'freefilesync' (13.1) [64bit]
FreeFileSync_13.1_Windows_Portable.zip (21,3 MB) [===========] 100%
Checking hash of FreeFileSync_13.1_Windows_Portable.zip ... ok.
Extracting FreeFileSync_13.1_Windows_Portable.zip ... done.
Running pre_install script...
Linking ~\scoop\apps\freefilesync\current => ~\scoop\apps\freefilesync\13.1
Creating shim for 'freefilesync'.
Creating shim for 'realtimesync'.
Creating shortcut for FreeFileSync (freefilesync.exe)
Creating shortcut for RealTimeSync (realtimesync.exe)
Persisting dummy
'freefilesync' (13.1) was installed successfully!

Possible Solution

Use paths without spaces. :-) Sorry if this is known like a "won't fix" bug. In that case may you point me to a reference that clarifies it (help, wiki, etc)?

System details

Windows version: 10 OS architecture: 64bit PowerShell version: 7.3.9

Scoop Configuration

{
  "last_update": "2023-11-07T09:20:25.0145062-03:00",
  "proxy": "",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "master"
}

juliomaranhao avatar Nov 07 '23 13:11 juliomaranhao