INNER CODE UNIT · Go

scriptTimeout

ddev/ddev · winpkg/wsl2_install_scripts_test.go:114

			const scriptTimeout = 15 * time.Minute
			ctx, cancel := context.WithTimeout(context.Background(), scriptTimeout)
			defer cancel()

			cmd := osexec.CommandContext(ctx, "powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", scriptFullPath, "-Distro", tc.distro)
			stdoutPipe, pipeErr := cmd.StdoutPipe()
			require.NoError(pipeErr)
			stderrPipe, pipeErr := cmd.StderrPipe()
			require.NoError(pipeErr)

			require.NoError(cmd.Start(), "Failed to start install script %s", tc.script)

			var (
				outputBuf bytes.Buffer
				mu        sync.Mutex
				wg        sync.WaitGroup
			)
			for _, pipe := range []io.Reader{stdoutPipe, stderrPipe} {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…