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
The test:run command fails with and unhandled exceptions when a user tries to write the execution results on a folder they don't have access to or is a read-only folder.
Steps To Reproduce:
Run force:test:run and provide an output directory that is set as a read only directory
sfdx force:apex:test:run -l RunLocalTests -d "/.sfdx/tools/customresultsv2"
Listening for streaming state changes...
Processing test run 7075A0000BiWoduQQC
Processing test run 7075A0000BiWoduQQC
Processing test run 7075A0000BiWoduQQC
Processing test run 7075A0000BiWoduQQC
Processing test run 7075A0000BiWoduQQC
Processing test run 7075A0000BiWoduQQC
Run "sfdx force:apex:test:report -i 7075A0000BiWodu -u [email protected]" to retrieve test results
(node:85517) UnhandledPromiseRejectionWarning: Error: EROFS: read-only file system, mkdir '/.sfdx'
at Object.mkdirSync (fs.js:987:3)
at ensureDirectoryExists (/Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/src/utils/fileSystemHandler.ts:17:6)
at ensureDirectoryExists (/Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/src/utils/fileSystemHandler.ts:16:3)
at ensureDirectoryExists (/Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/src/utils/fileSystemHandler.ts:16:3)
at ensureFileExists (/Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/src/utils/fileSystemHandler.ts:21:3)
at /Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/src/utils/fileSystemHandler.ts:57:5
at Array.map (<anonymous>)
at Object.<anonymous> (/Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/src/utils/fileSystemHandler.ts:56:33)
at Generator.next (<anonymous>)
at /Users/lcamposguajardo/github/DevTools/salesforcedx-apex/packages/plugin-apex/node_modules/@salesforce/apex-node/lib/src/utils/fileSystemHandler.js:14:71
(Use `node --trace-warnings ...` to show where the warning was created)
(node:85517) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:85517) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Expected result
The command should finish the execution successfully and provide a warning that files couldn't be created since the path provided is not writeable.
The text was updated successfully, but these errors were encountered:
Summary
The test:run command fails with and unhandled exceptions when a user tries to write the execution results on a folder they don't have access to or is a read-only folder.
Steps To Reproduce:
sfdx force:apex:test:run -l RunLocalTests -d "/.sfdx/tools/customresultsv2"
Expected result
The command should finish the execution successfully and provide a warning that files couldn't be created since the path provided is not writeable.
The text was updated successfully, but these errors were encountered: