pw_env_setup: Make npm actions more robust

Fixes a few issues with pw_env_setup's handling of npm:
* npm cache wasn't isolated to the Pigweed environment.
* npm.cmd is the right thing to search for when running npm on Windows.
* Not piping DEVNULL to stdin would sometimes cause npm to prompt for
  input.

Bug: b/305042957, b/322437881, b/323378974
Change-Id: I0e7315dcc1ae6f2dd38afb5191d4eac550afde6d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/189358
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: Chad Norvell <chadnorvell@google.com>
Commit-Queue: Armando Montanez <amontanez@google.com>
2 files changed
tree: dcd773e110767d81011e6d589d2129c2e193093b
  1. .allstar/
  2. .vscode/
  3. build_overrides/
  4. docker/
  5. docs/
  6. kudzu/
  7. pw_alignment/
  8. pw_allocator/
  9. pw_analog/
  10. pw_android_toolchain/
  11. pw_arduino_build/
  12. pw_assert/
  13. pw_assert_basic/
  14. pw_assert_log/
  15. pw_assert_tokenized/
  16. pw_assert_zephyr/
  17. pw_async/
  18. pw_async2/
  19. pw_async2_basic/
  20. pw_async_basic/
  21. pw_base64/
  22. pw_bloat/
  23. pw_blob_store/
  24. pw_bluetooth/
  25. pw_bluetooth_hci/
  26. pw_bluetooth_profiles/
  27. pw_bluetooth_sapphire/
  28. pw_boot/
  29. pw_boot_cortex_m/
  30. pw_build/
  31. pw_build_info/
  32. pw_build_mcuxpresso/
  33. pw_bytes/
  34. pw_checksum/
  35. pw_chre/
  36. pw_chrono/
  37. pw_chrono_embos/
  38. pw_chrono_freertos/
  39. pw_chrono_rp2040/
  40. pw_chrono_stl/
  41. pw_chrono_threadx/
  42. pw_chrono_zephyr/
  43. pw_cli/
  44. pw_compilation_testing/
  45. pw_console/
  46. pw_containers/
  47. pw_cpu_exception/
  48. pw_cpu_exception_cortex_m/
  49. pw_crypto/
  50. pw_digital_io/
  51. pw_digital_io_mcuxpresso/
  52. pw_digital_io_rp2040/
  53. pw_docgen/
  54. pw_doctor/
  55. pw_emu/
  56. pw_env_setup/
  57. pw_file/
  58. pw_format/
  59. pw_function/
  60. pw_fuzzer/
  61. pw_grpc/
  62. pw_hdlc/
  63. pw_hex_dump/
  64. pw_i2c/
  65. pw_i2c_linux/
  66. pw_i2c_mcuxpresso/
  67. pw_ide/
  68. pw_interrupt/
  69. pw_interrupt_cortex_m/
  70. pw_interrupt_xtensa/
  71. pw_interrupt_zephyr/
  72. pw_intrusive_ptr/
  73. pw_kvs/
  74. pw_libc/
  75. pw_libcxx/
  76. pw_log/
  77. pw_log_android/
  78. pw_log_basic/
  79. pw_log_null/
  80. pw_log_rpc/
  81. pw_log_string/
  82. pw_log_tokenized/
  83. pw_log_zephyr/
  84. pw_malloc/
  85. pw_malloc_freelist/
  86. pw_malloc_freertos/
  87. pw_metric/
  88. pw_minimal_cpp_stdlib/
  89. pw_module/
  90. pw_multibuf/
  91. pw_multisink/
  92. pw_package/
  93. pw_perf_test/
  94. pw_persistent_ram/
  95. pw_polyfill/
  96. pw_preprocessor/
  97. pw_presubmit/
  98. pw_protobuf/
  99. pw_protobuf_compiler/
  100. pw_random/
  101. pw_result/
  102. pw_ring_buffer/
  103. pw_router/
  104. pw_rpc/
  105. pw_rpc_transport/
  106. pw_rust/
  107. pw_snapshot/
  108. pw_software_update/
  109. pw_span/
  110. pw_spi/
  111. pw_spi_mcuxpresso/
  112. pw_status/
  113. pw_stm32cube_build/
  114. pw_stream/
  115. pw_stream_shmem_mcuxpresso/
  116. pw_stream_uart_linux/
  117. pw_stream_uart_mcuxpresso/
  118. pw_string/
  119. pw_symbolizer/
  120. pw_sync/
  121. pw_sync_baremetal/
  122. pw_sync_embos/
  123. pw_sync_freertos/
  124. pw_sync_stl/
  125. pw_sync_threadx/
  126. pw_sync_zephyr/
  127. pw_sys_io/
  128. pw_sys_io_ambiq_sdk/
  129. pw_sys_io_arduino/
  130. pw_sys_io_baremetal_lm3s6965evb/
  131. pw_sys_io_baremetal_stm32f429/
  132. pw_sys_io_emcraft_sf2/
  133. pw_sys_io_mcuxpresso/
  134. pw_sys_io_rp2040/
  135. pw_sys_io_stdio/
  136. pw_sys_io_stm32cube/
  137. pw_sys_io_zephyr/
  138. pw_system/
  139. pw_target_runner/
  140. pw_thread/
  141. pw_thread_embos/
  142. pw_thread_freertos/
  143. pw_thread_stl/
  144. pw_thread_threadx/
  145. pw_thread_zephyr/
  146. pw_tls_client/
  147. pw_tls_client_boringssl/
  148. pw_tls_client_mbedtls/
  149. pw_tokenizer/
  150. pw_toolchain/
  151. pw_toolchain_bazel/
  152. pw_trace/
  153. pw_trace_tokenized/
  154. pw_transfer/
  155. pw_unit_test/
  156. pw_unit_test_zephyr/
  157. pw_varint/
  158. pw_watch/
  159. pw_web/
  160. pw_work_queue/
  161. seed/
  162. targets/
  163. third_party/
  164. ts/
  165. zephyr/
  166. .bazelignore
  167. .bazelrc
  168. .black.toml
  169. .clang-format
  170. .clang-tidy
  171. .eslintrc.cjs
  172. .git-blame-ignore-revs
  173. .gitattributes
  174. .gitignore
  175. .gn
  176. .mypy.ini
  177. .prettierignore
  178. .prettierrc.cjs
  179. .pw_ide.yaml
  180. .pylintrc
  181. activate.bat
  182. Android.bp
  183. AUTHORS
  184. bootstrap.bat
  185. bootstrap.sh
  186. BUILD.bazel
  187. BUILD.gn
  188. BUILDCONFIG.gn
  189. CMakeLists.txt
  190. jest.config.ts
  191. Kconfig.zephyr
  192. LICENSE
  193. modules.gni
  194. OWNERS
  195. package-lock.json
  196. package.json
  197. pigweed.json
  198. PIGWEED_MODULES
  199. README.md
  200. rollup.config.js
  201. tsconfig.json
  202. WORKSPACE
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/.

Links