Skip to content

Commit

Permalink
Podman on MacOS requires abs path for files outside of root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
siarheiy committed Jun 14, 2024
1 parent dcb6165 commit 398697c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import { currentMachineIpv4 } from '../ipUtils';
import { getContainerEngineCmd } from '../containerEngineUtils';
import { readUuiSpecificEnvVariables } from '../envParamUtils';
import path from 'node:path';

const CONTAINER_ENGINE_CMD = getContainerEngineCmd();
const {
Expand Down Expand Up @@ -82,6 +83,7 @@ function getEnvParamsForDocker(): string[] {
}

function getVolumesMapArgs() {
const absPathToPreviewIds = forwardSlashes(path.resolve('../app/src/docs/_types/previewIds.ts'));
// files/folders to mount volumes
return [
'./scripts',
Expand All @@ -94,5 +96,9 @@ function getVolumesMapArgs() {
const to = `/e2e/${from.replace('./', '')}`;
acc.push('-v', `${from}:${to}`);
return acc;
}, []).concat(['-v', '../app/src/docs/_types/previewIds.ts:/app/src/docs/_types/previewIds.ts']);
}, []).concat(['-v', `${absPathToPreviewIds}:/app/src/docs/_types/previewIds.ts`]);
}

function forwardSlashes(pathStr: string) {
return pathStr.replace(/\\/g, '/');
}

0 comments on commit 398697c

Please sign in to comment.