Skip to content

Escape parameters with Shellwords.join in Justrun.command by default, introduce Justrun.script for raw input #2

Description

@Nowaker

We should provide security out-of-the-box.

Currently:

command = Shellwords.join ['bin/hypervisor_ssh_check', "root@#{host}", '-p', "#{port}"]
JustRun.command command, env: env do |line|
  ...
end

Expected:

JustRun.command 'bin/hypervisor_ssh_check', "root@#{host}", '-p', "#{port}", env: env do |line|
  ...
end

This won't work with commands like echo 1 || exit. A new method Justrun.script would accept a string without doing anything on it.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions