Skip to content

Commit

Permalink
fix: error in windows "Error: EPERM: operation not permitted, unlink" (
Browse files Browse the repository at this point in the history
…#134)

Co-authored-by: Phieu DINH <pdinh@fr.scc.com>
Co-authored-by: Azlam <43767972+azlam-abdulsalam@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 12, 2024
1 parent 299859b commit 357b118
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/artifacts/generators/ArtifactGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export default class ArtifactGenerator {
rimraf.sync(path.join(sfpPackage.workingDirectory, '.sfdx'));

fs.copySync(sfpPackage.workingDirectory, sourcePackage);
rimraf.sync(sfpPackage.workingDirectory);
// rimraf.sync(sfpPackage.workingDirectory); // This gives an error in windows "Error: EPERM: operation not permitted, unlink" https://github.com/flxbl-io/sfp/issues/128
rimraf.moveRemoveSync(sfpPackage.workingDirectory);

//Modify Source Directory to the new source directory inside the artifact
sfpPackage.sourceDir = `source`;
Expand Down Expand Up @@ -82,7 +83,8 @@ export default class ArtifactGenerator {
);

// Cleanup unzipped artifact
rimraf.sync(artifactFilepath);
// rimraf.sync(artifactFilepath); // This gives an error in windows "Error: EPERM: operation not permitted, unlink" https://github.com/flxbl-io/sfp/issues/128
rimraf.moveRemoveSync(artifactFilepath);

return zipArtifactFilepath;
} catch (error) {
Expand Down

0 comments on commit 357b118

Please sign in to comment.