Skip to content

Commands don't run if the current directory's full path contains a space #66

Description

@sabslikesobs
> bin/rails litestream:databases
2025/08/25 17:40:52 ERROR failed to run error="too many arguments"

All litestream: commands fail mysteriously if the user's current working directory contains a space somewhere in it.

This line is to blame: https://github.com/fractaledmind/litestream-ruby/blob/main/lib/litestream/commands.rb#L165

stdout = `#{cmd.join(" ")}`.chomp

The line doesn't escape any command arguments, and somewhere else it expands the working directory into a full path, so a directory like /home/my work/repo will count as home/my and work/repo.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions