Skip to content

Allow any command-line for caddy excutable path to allow Flatpak compatibility #56

Open
@rugk

Description

@rugk

Is your request related to a problem?
I install VSCodium as a Flatpak from Flathub. As such, the application is sandboxed, but it has the flatpak-span --host command that you can use to escape the sandbox.

I'd like to do this, so I add this to caddyfile.executable:

flatpak spawn --host 'podman run --rm --name caddyformat -v $PWD/Caddyfile:/Caddyfile:z caddy caddy'

Yes in my example I use podman again on the host to check execute caddy as a container, actually.
Anyway, that does not matter and if I run the command on the host it also works:

$ podman run --rm --name caddyformat -v $PWD:/test:z caddy caddy fmt /test/Caddyfile

Describe the solution you would like
What is preventing me is this error that checks whether that is a path, it should allow any CLI command, actually.

Describe any alternatives you have considered
N/A

Screenshots
N/A

Additional Context
This is the error that needs to be removed:
https://github.com/matthewpi/vscode-caddyfile-support/blob/c86bb3527a303ec2d65249c6e4af560979aca198/src/formatter.ts#L30

Metadata

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