////

스크립트 자동화는 셸 문자열보다 언어 기본 API를 우선

로컬 빌드나 벤치마크용 스크립트는 작은 셸 호출 실수 하나로 조용히 실패하고 부산물만 남기기 쉽다. 파일 삭제와 프로세스 실행은 문자열 셸 아웃 대신 언어 런타임의 안전한 API와 명시적 인자 분리를 사용하고, 실패를 무시하지 않도록 만드는 편이 장기적으로 안정적이다.

////

Summary#

로컬 빌드나 벤치마크용 스크립트는 작은 셸 호출 실수 하나로 조용히 실패하고 부산물만 남기기 쉽다. 파일 삭제와 프로세스 실행은 문자열 셸 아웃 대신 언어 런타임의 안전한 API와 명시적 인자 분리를 사용하고, 실패를 무시하지 않도록 만드는 편이 장기적으로 안정적이다.

Problem#

정리 스크립트나 프로세스 시작 로직이 셸 옵션 파싱과 인자 배치에 의존하면 OS별 오동작이 생기고, 실패가 무시되면 중복 산출물이나 벤치마크 시작 실패가 숨어버린다.

Solution#

삭제는 rm 같은 셸 명령 대신 fs.rmSync 같은 런타임 API로 대체하고, 프로세스 실행은 실행 파일·argv·options를 분리해 전달한다. 호출 결과를 검사하거나 실패가 드러나도록 테스트를 붙여 조용한 실패를 막는다.

Failure Modes#

  • 잘못된 옵션 문자열이 그대로 셸에 전달됨
  • 실행 파일과 인자를 하나의 문자열로 넘겨 잘못된 바이너리를 찾음
  • spawn 옵션 객체를 argv에 넣는 실수
  • spawnSync 결과를 무시해 cleanup 실패가 누락됨

Sources#

  • https://github.com/Comfy-Org/ComfyUI/pull/14632
  • https://github.com/Comfy-Org/ComfyUI/pull/14626
  • https://github.com/Comfy-Org/ComfyUI/pull/14537
  • https://github.com/Comfy-Org/ComfyUI/pull/14616
  • https://github.com/Comfy-Org/ComfyUI/pull/14298
  • https://github.com/Comfy-Org/ComfyUI/pull/14136
  • https://github.com/Comfy-Org/ComfyUI/pull/14614
  • https://github.com/Comfy-Org/ComfyUI/pull/14612
  • https://github.com/Comfy-Org/ComfyUI/pull/14613
  • https://github.com/Comfy-Org/ComfyUI/pull/14611
  • https://github.com/GitHubDaily/GitHubDaily/pull/267
  • https://github.com/GitHubDaily/GitHubDaily/pull/52
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2349
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2348
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2347
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2345
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2317
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2337
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2338
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2340
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2332
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2336
  • https://github.com/react/react/pull/36828
  • https://github.com/react/react/pull/36871
  • https://github.com/react/react/pull/36859
  • https://github.com/react/react/pull/36860
  • https://github.com/react/react/pull/36862
  • https://github.com/react/react/pull/36873
  • https://github.com/react/react/pull/36835
  • https://github.com/thedaviddias/Front-End-Checklist/pull/664
  • https://github.com/thedaviddias/Front-End-Checklist/pull/680
  • mined_at: 2026-06-25T15:14:40Z

Sagwan Revalidation 2026-06-25T15:54:17Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 우선하는 권장은 여전히 유효함

Sagwan Revalidation 2026-06-26T18:32:37Z#

  • verdict: ok
  • note: 언어 기본 API와 argv 분리 권장은 현재도 유효한 자동화 관행이다.

Sagwan Revalidation 2026-06-27T21:19:59Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 권장하는 내용은 여전히 유효함

Sagwan Revalidation 2026-06-28T21:22:47Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 우선하는 권장은 여전히 유효하다.

Sagwan Revalidation 2026-06-29T23:01:14Z#

  • verdict: ok
  • note: 언어 기본 API와 인자 분리 권장은 최신 practice와도 일치한다.

Sagwan Revalidation 2026-07-01T04:30:20Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 쓰라는 권장은 여전히 유효함

Sagwan Revalidation 2026-07-02T14:30:23Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 우선하라는 권장은 여전히 유효함.

Sagwan Revalidation 2026-07-04T03:04:50Z#

  • verdict: ok
  • note: 언어 기본 API와 argv 분리 권장은 현재도 일반적 모범 사례다.

Sagwan Revalidation 2026-07-05T05:49:18Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 권장하는 내용은 여전히 유효함

Sagwan Revalidation 2026-07-06T12:17:22Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 인자 분리를 쓰라는 권장은 여전히 유효함

Sagwan Revalidation 2026-07-07T18:18:08Z#

  • verdict: ok
  • note: 언어 기본 API와 argv 분리 권장은 최신 자동화 관행에도 부합한다.

Sagwan Revalidation 2026-07-09T15:16:37Z#

  • verdict: ok
  • note: 언어 API와 argv 분리 권장은 현재도 표준적 practice라 변경 불필요.

Sagwan Revalidation 2026-07-11T07:18:58Z#

  • verdict: ok
  • note: 런타임 파일 API와 argv 분리 실행 권장은 현재도 유효한 관행이다.

Sagwan Revalidation 2026-07-13T01:29:36Z#

  • verdict: ok
  • note: 안전한 파일/프로세스 API 사용 권장은 여전히 최신 practice와 부합함

Sagwan Revalidation 2026-07-15T00:05:08Z#

  • verdict: ok
  • note: 언어 API와 argv 분리 권장은 최신 자동화 관행에도 여전히 부합함

Sagwan Revalidation 2026-07-17T01:09:57Z#

  • verdict: ok
  • note: 최근 검증 이후 변화 가능성이 낮고 권장안도 현재 practice와 부합함

Sagwan Revalidation 2026-07-19T02:10:52Z#

  • verdict: ok
  • note: 셸 문자열보다 런타임 API와 argv 분리를 우선하는 권장은 여전히 유효함

Sagwan Revalidation 2026-07-21T04:02:23Z#

  • verdict: ok
  • note: 일반 원칙과 Node 프로세스/파일 API 권장은 여전히 유효하다.

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1