Skip to content

Commit 682789f

Browse files
committed
fix: apply SC2002 fix according to CI
1 parent 1601e1b commit 682789f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

LFC/LFC.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ stream_tarball_over_tcp() {
307307
# Method 2: Try netcat (nc)
308308
if command -v nc >/dev/null 2>&1; then
309309
write_log "INFO" "Attempting to use nc (netcat)"
310-
if cat "$tarball_path" | nc "$ip" "$port" 2>/dev/null; then
310+
if nc "$ip" "$port" < "$tarball_path" 2>/dev/null; then
311311
write_log "INFO" "Successfully streamed tarball using nc"
312312
return 0
313313
else
@@ -318,7 +318,7 @@ stream_tarball_over_tcp() {
318318
# Method 3: Try ncat (from nmap)
319319
if command -v ncat >/dev/null 2>&1; then
320320
write_log "INFO" "Attempting to use ncat"
321-
if cat "$tarball_path" | ncat "$ip" "$port" 2>/dev/null; then
321+
if ncat "$ip" "$port" < "$tarball_path" 2>/dev/null; then
322322
write_log "INFO" "Successfully streamed tarball using ncat"
323323
return 0
324324
else

0 commit comments

Comments
 (0)