Skip to content

Commit

Permalink
Add function to run PS commands on studio
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Chulak <vitalii@daynix.com>
  • Loading branch information
Jedoku authored and kostyanf14 committed Jan 20, 2025
1 parent 171c840 commit 5735e53
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/rtoolsHCK.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,22 @@ def run_on_machine(machine, cmd)
end
end

# == Description
#
# Run command on a studio, (powershell).
#
# == Params:
#
# +command+:: The command to run as a string
def run_on_studio(command)
handle_action_exceptions(__method__) do
ret = run(command)
return (@json ? { 'result' => 'Success' } : true) if ret.empty?

@json ? { 'result' => 'Success', 'content' => ret } : true
end
end

# == Description
#
# Upload directory to temp directory of the machine.
Expand Down

0 comments on commit 5735e53

Please sign in to comment.