-
-
Notifications
You must be signed in to change notification settings - Fork 368
Description
Link to bug demonstration repository
https://github.com/loidy/nyccwd - or any other initial angular project
Steps to reproduce
npm installnpm run devorng build --configuration developmentnyc instrument --complete-copy --delete --source-map=true --cwd dist/nyccwd . instrumented
Expected Behavior
When --cwd option is used, I expect that input is relative to provided --cwd path.
Observed Behavior
Input is still relative to current directory regardless of --cwd option. However, cwd is still used when considering if file should be instrumented. In combination with --complete-copy it results in complete copy of the input (relative to current directory, not cwd) directory without instrumenting any file.
Troubleshooting steps
Environment Information
System:
OS: Windows 10 10.0.19044
CPU: (16) x64 AMD Ryzen 7 5800HS with Radeon Graphics
Memory: 10.61 GB / 39.41 GB
Binaries:
Node: 14.20.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.17 - C:\Program Files\nodejs\npm.CMD
npmPackages:
nyc: git+https://github.com/loidy/nyc.git#cwd-fix => 15.1.0
typescript: ~4.7.2 => 4.7.4
Proposed Solution
Additional Information
I needed to instrument code with relative paths to --cwd directory, because I have to run it on different system. For this I provided relative path to transform function instead of absolute. Without correct --cwd behavior I was not able to run command from project root directory and still access original source files to remap sources.