You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When npm install fails as part of taq install, we don't capture or process the failure and just assume that the plugin was installed successfully.
For instance, if you run taq install thecatcameback we will assume that npm install completed successfully, and then try to read the package.json of the plugin to get its valid package name which fails and produces this error:
Could not read /Users/mweichert/Projects/test-project/node_modules/thecatcameback/package.json
The taq install thecatcameback task will return exit code 9, as this line will be triggered in our error response logic:
.with({kind: 'E_READFILE'},err=>[9,err.msg])
β To Do
We should check the status code of the npm install command and if non-zero, throw a new TaqError of kind 'E_INSTALL_PLUGINand then handle that in ourdisplayError` function in cli.ts.
We can then unskip this test in taqueria-cli-e2e-smoke-spec.ts:
test.skip('install a package that does not exist will error', async () => {
const { execute, cleanup, spawn } = await prepareEnvironment();
const { waitForText } = await spawn('taq', 'init test-project --debug');
await waitForText("Project taq'ified!");
const { code } = await execute('taq', 'install acoupleofecadhamburgers -p foobar');
expect(code).toBe(1);
await cleanup();
});
βοΈ Acceptance Criteria
β¨ Functional:
Running taq install thecatcameback should return a exit code and display an appropriate error message
The install a package that does not exist will error test is unskipped and working
π Scope
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
π Epic|Feature Link
No response
π₯ Definition of Done
π§° Work Description
When
npm install
fails as part oftaq install
, we don't capture or process the failure and just assume that the plugin was installed successfully.For instance, if you run
taq install thecatcameback
we will assume thatnpm install
completed successfully, and then try to read the package.json of the plugin to get its valid package name which fails and produces this error:The
taq install thecatcameback
task will return exit code 9, as this line will be triggered in our error response logic:β To Do
We should check the status code of the
npm install
command and if non-zero, throw a new TaqError of kind 'E_INSTALL_PLUGINand then handle that in our
displayError` function in cli.ts.We can then unskip this test in taqueria-cli-e2e-smoke-spec.ts:
βοΈ Acceptance Criteria
β¨ Functional:
taq install thecatcameback
should return a exit code and display an appropriate error messageinstall a package that does not exist will error
test is unskipped and workingπ Scope
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: