Skip to content

Commit

Permalink
NC | remove input from spawn options print and fix exec test
Browse files Browse the repository at this point in the history
Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com>
(cherry picked from commit 791d47e)
  • Loading branch information
romayalon committed Jun 13, 2024
1 parent 7025f79 commit 41e8588
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 @@ -125,7 +125,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 41e8588

Please sign in to comment.