Prerequisites
Reproduction url
https://github.com/trueberryless/knip-github-actions-working-directory-repro
Reproduction access
Description of the issue
If you define a GitHub Action where you execute some npm (or pnpm) command with a custom defined script from a package.json that is not the root package.json (in a monorepo) and you correctly set the working-directory option to the path where the package.json with this script is located, Knip reports an "Unlisted binary" error.
I made a GitHub repo repro because I couldn't figure out how to open the terminal in Codesandbox and Stackblitz in the minimal reproduction repros linked from docs.
If you go to the .github/workflows/example.yml I explain what the problem is there as well.
I also tried to create a fixture in Knip to show that it is not working, but for some reason the tests always pass. I am a little flabbergasted of this issue to be honest, so I decided to open an issue. Maybe you, Lars, have an idea what is going on here. At this point, it could be that I am overlooking something obvious 😅
Prerequisites
Reproduction url
https://github.com/trueberryless/knip-github-actions-working-directory-repro
Reproduction access
Description of the issue
If you define a GitHub Action where you execute some
npm(orpnpm) command with a custom defined script from apackage.jsonthat is not the rootpackage.json(in a monorepo) and you correctly set theworking-directoryoption to the path where thepackage.jsonwith this script is located, Knip reports an "Unlisted binary" error.I made a GitHub repo repro because I couldn't figure out how to open the terminal in Codesandbox and Stackblitz in the minimal reproduction repros linked from docs.
If you go to the
.github/workflows/example.ymlI explain what the problem is there as well.I also tried to create a fixture in Knip to show that it is not working, but for some reason the tests always pass. I am a little flabbergasted of this issue to be honest, so I decided to open an issue. Maybe you, Lars, have an idea what is going on here. At this point, it could be that I am overlooking something obvious 😅