Fixes on the admin initialization cmd
This commit is contained in:
parent
96690e1354
commit
4f2790f6d3
@ -109,7 +109,10 @@ export async function command(params: { buildContext: BuildContext }) {
|
|||||||
.toString("utf8")
|
.toString("utf8")
|
||||||
.trim()
|
.trim()
|
||||||
) as string[]
|
) as string[]
|
||||||
).find(version =>
|
)
|
||||||
|
.reverse()
|
||||||
|
.filter(version => !version.includes("-"))
|
||||||
|
.find(version =>
|
||||||
uiSharedMajor === undefined ? true : version.startsWith(`${uiSharedMajor}.`)
|
uiSharedMajor === undefined ? true : version.startsWith(`${uiSharedMajor}.`)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -105,16 +105,16 @@ async function runPackageManagerInstall(params: {
|
|||||||
shell: true
|
shell: true
|
||||||
});
|
});
|
||||||
|
|
||||||
child.stdout.on("data", data => {
|
child.stdout.on("data", data => process.stdout.write(data));
|
||||||
|
|
||||||
|
child.stderr.on("data", data => {
|
||||||
if (data.toString("utf8").includes("has unmet peer dependency")) {
|
if (data.toString("utf8").includes("has unmet peer dependency")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
process.stdout.write(data);
|
process.stderr.write(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
child.stderr.on("data", data => process.stderr.write(data));
|
|
||||||
|
|
||||||
child.on("exit", code => {
|
child.on("exit", code => {
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
dCompleted.reject(new Error(`Failed with code ${code}`));
|
dCompleted.reject(new Error(`Failed with code ${code}`));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user