libdragon 12.0.2 → 12.0.3
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/modules/actions/exec.js +15 -17
- package/modules/actions/start.js +6 -1
- package/modules/helpers.js +1 -0
- package/modules/utils.js +6 -1
- package/package.json +1 -1
package/modules/actions/exec.js
CHANGED
|
@@ -66,24 +66,22 @@ const exec = async (info) => {
|
|
|
66
66
|
const stdin = new PassThrough();
|
|
67
67
|
|
|
68
68
|
/** @type {string[]} */
|
|
69
|
-
const paramsWithConvertedPaths = (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (item.startsWith('-')) {
|
|
73
|
-
return item;
|
|
74
|
-
}
|
|
75
|
-
if (
|
|
76
|
-
item.includes(path.sep) &&
|
|
77
|
-
((await fileExists(item)) || (await dirExists(item)))
|
|
78
|
-
) {
|
|
79
|
-
return toPosixPath(
|
|
80
|
-
path.isAbsolute(item) ? path.relative(process.cwd(), item) : item
|
|
81
|
-
);
|
|
82
|
-
}
|
|
69
|
+
const paramsWithConvertedPaths = await Promise.all(
|
|
70
|
+
parameters.map(async (item) => {
|
|
71
|
+
if (item.startsWith('-')) {
|
|
83
72
|
return item;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
}
|
|
74
|
+
if (
|
|
75
|
+
item.includes(path.sep) &&
|
|
76
|
+
((await fileExists(item)) || (await dirExists(item)))
|
|
77
|
+
) {
|
|
78
|
+
return toPosixPath(
|
|
79
|
+
path.isAbsolute(item) ? path.relative(process.cwd(), item) : item
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
return item;
|
|
83
|
+
})
|
|
84
|
+
);
|
|
87
85
|
|
|
88
86
|
/**
|
|
89
87
|
*
|
package/modules/actions/start.js
CHANGED
|
@@ -59,7 +59,12 @@ const initContainer = async (libdragonInfo) => {
|
|
|
59
59
|
'-R',
|
|
60
60
|
`${uid >= 0 ? uid : ''}:${gid >= 0 ? gid : ''}`,
|
|
61
61
|
'/n64_toolchain',
|
|
62
|
-
]
|
|
62
|
+
],
|
|
63
|
+
{
|
|
64
|
+
spawnOptions: {
|
|
65
|
+
shell: true,
|
|
66
|
+
},
|
|
67
|
+
}
|
|
63
68
|
);
|
|
64
69
|
} catch (e) {
|
|
65
70
|
// Dispose the invalid container, clean and exit
|
package/modules/helpers.js
CHANGED
package/modules/utils.js
CHANGED
|
@@ -40,7 +40,12 @@ const installDependencies = async (libdragonInfo) => {
|
|
|
40
40
|
CONTAINER_TARGET_PATH + '/' + libdragonInfo.vendorDirectory,
|
|
41
41
|
...dockerHostUserParams(libdragonInfo),
|
|
42
42
|
],
|
|
43
|
-
['/bin/bash', './build.sh']
|
|
43
|
+
['/bin/bash', './build.sh'],
|
|
44
|
+
{
|
|
45
|
+
spawnOptions: {
|
|
46
|
+
shell: true,
|
|
47
|
+
},
|
|
48
|
+
}
|
|
44
49
|
);
|
|
45
50
|
};
|
|
46
51
|
|