Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Improve manifest "persist" #6179

Open
milnak opened this issue Oct 10, 2024 · 0 comments
Open

[Feature] Improve manifest "persist" #6179

milnak opened this issue Oct 10, 2024 · 0 comments

Comments

@milnak
Copy link

milnak commented Oct 10, 2024

Feature Request

Is your feature request related to a problem? Please describe.

Manifest "persist" assumes the object to be persisted is a folder, and very often its not.

    "persist": [
        "state.bin",
        "folder"
    ]

because of this, almost every manifest forces an empty file to be created, e.g.

    "pre_install": [
        "'state.bin' | ForEach-Object { New-Item -Path (Join-Path -Path $dir -ChildPath $_) -ItemType File -ErrorAction SilentlyContinue | Out-Null }"
    ],

Describe the solution you'd like

would be great to be able to optionally specify a type, e.g.

    "persist": [
        { "state.bin", "File" },
        { "folder", "Directory" }
    ]

and therefore, scoop wouldn't need to have a pre-existing object in the $dir folder.

Describe alternatives you've considered

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

No branches or pull requests

1 participant