Skip to content

Commit

Permalink
write .sig file in ucp/modules/ directory if specified as an argument…
Browse files Browse the repository at this point in the history
… to installModule()
  • Loading branch information
gynt committed Aug 26, 2024
1 parent e150980 commit 4c30088
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/function/extensions/installation/install-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ export const installModule = async (
const name = await basename(path);

const sigPath = `${path}.sig`;
const sigDestPath = `${destination}/${name}.sig`;

if (await exists(sigPath)) {
(await copyFile(sigPath, `${destination}/${name}.sig`)).throwIfErr();
(await copyFile(sigPath, sigDestPath)).throwIfErr();
}

if (signature !== undefined) {
(await writeTextFile(sigPath, signature)).throwIfErr();
(await writeTextFile(sigDestPath, signature)).throwIfErr();
}

(await copyFile(path, `${destination}/${name}`)).throwIfErr();
Expand Down

0 comments on commit 4c30088

Please sign in to comment.