Say I create a my-npx-hello-world repo
it has the following files
my-npx-hello-world/
foo.sh
index.sh
package.json
the package.json has
"bin": "./index.sh"
the index.sh calls ./foo.sh i.e.
#!/bin/sh
echo "running foo"
./foo.sh
Now, when I try to run this
# npx my-npx-hello-world
running foo
line 4: ./foo.sh: No such file or directory
That is because it is looking for foo.sh in my CWD and not in the my-npx-hello-world repo.
What do I need to do so I can have the index.sh execute the foo.sh script in the same repo.