Skip to content

Commit

Permalink
Merge pull request #8133 from romayalon/romy-fix-exec-tests-and-remov…
Browse files Browse the repository at this point in the history
…e-log-message

NC | remove input from spawn options print and fix exec test
  • Loading branch information
romayalon authored Jun 13, 2024
2 parents 884cad0 + 791d47e commit a1a5e58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ key="$1"
file_name="${TMP_PATH}/noobaa.$key"
current_version="$2"
TMPFILE="$(mktemp)"
trap 'rm -f &>/dev/null -- "$TMPFILE"' EXIT
# write stdin of the script to temp file
cat > "$TMPFILE"
if [ -e "$file_name" ]; then
echo '{ "status": "VERSION_MISMATCH" }'
else
out=$(cat > "$file_name" 2>/dev/null)
out=$(cat "$TMPFILE" > "$file_name" 2>/dev/null)
rc=$?
if [ $rc -eq 0 ]; then
echo '{ "status": "OK" }'
Expand Down
2 changes: 1 addition & 1 deletion src/util/os_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function spawn(command, args, options, ignore_rc, unref, timeout_ms) {
return new Promise((resolve, reject) => {
options = options || {};
args = args || [];
dbg.log0('spawn:', command, args.join(' '), options, ignore_rc);
dbg.log0('spawn:', command, args.join(' '), _.omit(options, 'input'), ignore_rc);
options.stdio = options.stdio || 'inherit';
const return_stdout = options.return_stdout;
const proc = child_process.spawn(command, args, options);
Expand Down

0 comments on commit a1a5e58

Please sign in to comment.