mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Support app params and docker params separately
This commit is contained in:
parent
2376ef8b8c
commit
2d1e8f10b7
@ -28,10 +28,12 @@ import PluginConfigOptions = Cypress.PluginConfigOptions;
|
|||||||
export function dockerRun(args: {
|
export function dockerRun(args: {
|
||||||
image: string;
|
image: string;
|
||||||
containerName: string;
|
containerName: string;
|
||||||
params?: string[];
|
dockerParams?: string[];
|
||||||
|
applicationParams?: string[];
|
||||||
}): Promise<string> {
|
}): Promise<string> {
|
||||||
const userInfo = os.userInfo();
|
const userInfo = os.userInfo();
|
||||||
const params = args.params ?? [];
|
const params = args.dockerParams ?? [];
|
||||||
|
const appParams = args.applicationParams ?? [];
|
||||||
|
|
||||||
if (userInfo.uid >= 0) {
|
if (userInfo.uid >= 0) {
|
||||||
// On *nix we run the docker container as our uid:gid otherwise cleaning it up its media_store can be difficult
|
// On *nix we run the docker container as our uid:gid otherwise cleaning it up its media_store can be difficult
|
||||||
@ -45,10 +47,12 @@ export function dockerRun(args: {
|
|||||||
"-d",
|
"-d",
|
||||||
...params,
|
...params,
|
||||||
args.image,
|
args.image,
|
||||||
"run",
|
... appParams
|
||||||
], (err, stdout) => {
|
], (err, stdout, stderr) => {
|
||||||
console.log("error", err, "stdout", stdout);
|
console.log("error", err, "stdout", stdout, "stderr", stderr);
|
||||||
if (err) reject(err);
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
resolve(stdout.trim());
|
resolve(stdout.trim());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user