blackstack-nodes 1.2.15 → 1.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blackstack-nodes.rb +9 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7030c06d185e9257db6bcf42deadcbcc1ac609f79140b8ce63f73f5368232144
|
4
|
+
data.tar.gz: adc175dd676a9b3940454342016ec82b96d771f885f6ca92d26f317d5f722331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3807f8df44577cff9d4b57329ad28e2a6216bce5566a178893ed390c2b6f943b45ddbd561b2fa793506010a586108468eb0e05c53e55ce81f36c74089bb2eb
|
7
|
+
data.tar.gz: 3cf124a33af4fcffaa3fd2b642fe561774d296cc629cc67d0e9bb865425eb5688fa13bf0e68b89a0272c1c7337b1fb06490b4669c86165bd421bbc88ef68d37a
|
data/lib/blackstack-nodes.rb
CHANGED
@@ -128,16 +128,19 @@ module BlackStack
|
|
128
128
|
#
|
129
129
|
def exec(
|
130
130
|
command,
|
131
|
-
output_file: "
|
132
|
-
error_file: "
|
133
|
-
exit_code_file: "
|
131
|
+
output_file: "$HOME/.bash-command-stdout-buffer",
|
132
|
+
error_file: "$HOME/.bash-command-stderr-buffer",
|
133
|
+
exit_code_file: "$HOME/.bash-command-exit-code"
|
134
134
|
)
|
135
135
|
# Construct the remote command with redirection for stdout, stderr, and capturing exit code
|
136
136
|
remote_command = "#{command} > #{output_file} 2> #{error_file}; echo $? > #{exit_code_file}"
|
137
|
-
|
137
|
+
|
138
138
|
# Execute the command on the remote server, truncating output, error, and exit code files
|
139
|
-
self.ssh.exec!("truncate -s 0 #{output_file} #{error_file} #{exit_code_file}
|
140
|
-
|
139
|
+
self.ssh.exec!("truncate -s 0 #{output_file} #{error_file} #{exit_code_file}")
|
140
|
+
|
141
|
+
# Execute the command on the remote server, truncating output, error, and exit code files
|
142
|
+
self.ssh.exec!(remote_command)
|
143
|
+
|
141
144
|
# Retrieve the exit code
|
142
145
|
exit_code = self.ssh.exec!("cat #{exit_code_file}").to_s.chomp.to_i
|
143
146
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackstack-nodes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|