buildwithnexus 0.5.12 → 0.5.13
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.
- package/dist/bin.js +12 -8
- package/dist/nexus-release.tar.gz +0 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1020,6 +1020,11 @@ async function createCloudInitIso(userDataPath) {
|
|
|
1020
1020
|
const isoPath = path6.join(IMAGES_DIR2, "init.iso");
|
|
1021
1021
|
const env = scrubEnv();
|
|
1022
1022
|
try {
|
|
1023
|
+
const stagingDir = path6.join(CONFIGS_DIR, "cidata-staging");
|
|
1024
|
+
fs6.rmSync(stagingDir, { recursive: true, force: true });
|
|
1025
|
+
fs6.mkdirSync(stagingDir, { recursive: true, mode: 448 });
|
|
1026
|
+
fs6.copyFileSync(userDataPath, path6.join(stagingDir, "user-data"));
|
|
1027
|
+
fs6.copyFileSync(metaDataPath, path6.join(stagingDir, "meta-data"));
|
|
1023
1028
|
let created = false;
|
|
1024
1029
|
for (const tool of ["mkisofs", "genisoimage"]) {
|
|
1025
1030
|
if (created) break;
|
|
@@ -1031,8 +1036,7 @@ async function createCloudInitIso(userDataPath) {
|
|
|
1031
1036
|
"cidata",
|
|
1032
1037
|
"-joliet",
|
|
1033
1038
|
"-rock",
|
|
1034
|
-
|
|
1035
|
-
metaDataPath
|
|
1039
|
+
stagingDir
|
|
1036
1040
|
], { env });
|
|
1037
1041
|
created = true;
|
|
1038
1042
|
} catch {
|
|
@@ -1040,10 +1044,10 @@ async function createCloudInitIso(userDataPath) {
|
|
|
1040
1044
|
}
|
|
1041
1045
|
if (!created) {
|
|
1042
1046
|
try {
|
|
1043
|
-
const
|
|
1044
|
-
fs6.mkdirSync(
|
|
1045
|
-
fs6.copyFileSync(userDataPath, path6.join(
|
|
1046
|
-
fs6.copyFileSync(metaDataPath, path6.join(
|
|
1047
|
+
const stagingDir2 = path6.join(CONFIGS_DIR, "cidata-staging");
|
|
1048
|
+
fs6.mkdirSync(stagingDir2, { recursive: true, mode: 448 });
|
|
1049
|
+
fs6.copyFileSync(userDataPath, path6.join(stagingDir2, "user-data"));
|
|
1050
|
+
fs6.copyFileSync(metaDataPath, path6.join(stagingDir2, "meta-data"));
|
|
1047
1051
|
await execa3("hdiutil", [
|
|
1048
1052
|
"makehybrid",
|
|
1049
1053
|
"-o",
|
|
@@ -1052,9 +1056,9 @@ async function createCloudInitIso(userDataPath) {
|
|
|
1052
1056
|
"-iso",
|
|
1053
1057
|
"-default-volume-name",
|
|
1054
1058
|
"cidata",
|
|
1055
|
-
|
|
1059
|
+
stagingDir2
|
|
1056
1060
|
], { env });
|
|
1057
|
-
fs6.rmSync(
|
|
1061
|
+
fs6.rmSync(stagingDir2, { recursive: true, force: true });
|
|
1058
1062
|
created = true;
|
|
1059
1063
|
} catch {
|
|
1060
1064
|
}
|
|
Binary file
|