MCPcopy Index your code
hub / github.com/cameri/nostream / buildComposeArgs

Function buildComposeArgs

src/cli/utils/docker.ts:16–27  ·  view source on GitHub ↗
(files: string[], args: string[])

Source from the content-addressed store, hash-verified

14export const resolveComposeFile = (filename: string): string => getProjectPath(filename)
15
16export const buildComposeArgs = (files: string[], args: string[]): string[] => {
17 const out: string[] = []
18
19 for (const file of files) {
20 const fullPath = resolveComposeFile(file)
21 if (fs.existsSync(fullPath)) {
22 out.push('-f', fullPath)
23 }
24 }
25
26 return [...out, ...args]
27}
28
29export const runDockerCompose = async ({ files, args, env }: ComposeOptions): Promise<number> => {
30 const composeArgs = buildComposeArgs(files, args)

Callers 2

docker.spec.tsFile · 0.90
runDockerComposeFunction · 0.85

Calls 1

resolveComposeFileFunction · 0.85

Tested by

no test coverage detected