Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 Node.js 编写一个小 CLI 工具。在某些情况下,我想修改运行我的程序的 shell 的当前目录:
some/location$ myProg moveToSomewhere some/other/location$
child_process在这里无能为力,因为它的命令在不同的 shell 中运行。
child_process
有没有办法做到这一点?