Skip to content

fix: avoid DEP0190 warning when spawning subprocesses with shell mode#360

Merged
notgitika merged 1 commit intoaws:mainfrom
notgitika:fix/windows-shell-deprecation-warning
Feb 23, 2026
Merged

fix: avoid DEP0190 warning when spawning subprocesses with shell mode#360
notgitika merged 1 commit intoaws:mainfrom
notgitika:fix/windows-shell-deprecation-warning

Conversation

@notgitika
Copy link
Contributor

Description

  • When shell: true is passed to spawn/spawnSync alongside a non-empty args array, Node.js >= 22 emits a [DEP0190] DeprecationWarning
  • Added a resolveCommand helper in subprocess.ts that merges args into the command string when shell mode is active, passing an empty args array to the spawn
    call
  • Applied the fix to all 5 subprocess functions (runSubprocess, checkSubprocess, runSubprocessCapture, runSubprocessCaptureSync, checkSubprocessSync)

Related Issue

Closes #305

Documentation PR

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • [ x] I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@notgitika notgitika requested a review from a team February 20, 2026 16:05
@github-actions github-actions bot added the size/s PR size: S label Feb 20, 2026
@tejaskash
Copy link
Contributor

Can we supress or acknowledge the CodeQL warnings? The warnings might be on some code that is there by design but would be good to double check

Copy link
Contributor

@tejaskash tejaskash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify CodeQL warnings

@notgitika notgitika requested a review from tejaskash February 20, 2026 21:42
@notgitika notgitika merged commit e1d1e9b into aws:main Feb 23, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WINDOWS] Console warn error displayed during create

2 participants