0

I create a npm cli that clone my git repo

   shell.exec(
    `git clone https://github.com/ITSME/${name} ${process.env.PWD}/${pname}`
   );

But the problem is process.env.PWD always indicate workspace's root;

terminal(WORKSPACE_ROOT/no-mater/where/i/run/the/script.: npm myscript).
result: => WORKSPACE_ROOT/cloned`

I want to clone it to terminal's current working path.

Addintional Info

I am using monorepo with pnpm not npm actaully;;

And i linked my cli with pnpm link --global

MINJA KIM
  • 876
  • 1
  • 8
  • 22

0 Answers0