Skip to content

Commit 736d123

Browse files
authored
Fix the multipart upload issues and local command run issues (#42)
Signed-off-by: Aravinda VK <[email protected]>
1 parent 5b411e2 commit 736d123

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/kadalu/binnacle/plugins/http.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ def self.set_multipart_data(request, kwargs)
149149

150150
multipart_data = []
151151
multipart.each do |key, value|
152-
if value.start_with?('@')
152+
if value.is_a?(String) && value.start_with?('@')
153153
filepath = value.sub('@', '')
154154
filedata = File.open(filepath, 'rb')
155155
multipart_data << [key, filedata, { filename: File.basename(filepath) }]
156156
else
157-
multipart_data << [key, value]
157+
multipart_data << [key, value.to_s]
158158
end
159159
end
160160

lib/kadalu/binnacle/utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def escaped_ssh_cmd(cmd)
9090
# If node is not local then add respective prefix
9191
# to ssh or docker exec
9292
def full_cmd(cmd)
93-
return cmd if Store.get(:command_mode) == 'local'
93+
return cmd if Store.get(:command_mode) == 'local' || Store.get(:node_name) == 'local'
9494

9595
if Store.get(:command_mode) == 'ssh'
9696
"ssh #{Store.get(:ssh_user)}@#{Store.get(:node_name)} " \

0 commit comments

Comments
 (0)