pmcf 1.24.0 → 1.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { writeFile, mkdir, copyFile, glob } from "node:fs/promises";
3
+ import { writeFile, mkdir, copyFile, glob, chmod } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
5
  import { Host } from "pmcf";
6
6
  import { writeLines, sectionLines } from "../src/utils.mjs";
@@ -151,7 +151,9 @@ async function copySshKeys(host, dir) {
151
151
  await mkdir(sshDir, { recursive: true });
152
152
 
153
153
  for await (const file of glob("ssh_host_*", { cwd: host.directory })) {
154
- copyFile(join(host.directory, file), join(sshDir, file));
154
+ const destinationFileName = join(sshDir, file);
155
+ await copyFile(join(host.directory, file), destinationFileName);
156
+ await chmod(destinationFileName, destinationFileName.endsWith('.pub') ? 0o0644 : 0o0600);
155
157
  }
156
158
  }
157
159
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },