Skip to content

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

@Nowaker

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions