concourse / concourse

append possibly assigns to a wrong variable CRT-D0001
Bug risk
Minor
4 months ago3 years old
append result not assigned to the same slice
110		gdnServerFlags = append(gdnServerFlags, "--allow-host-access")
111	}
112
113	gdnArgs := append(gdnConfigFlag, append([]string{"server"}, gdnServerFlags...)...)114
115	var configFlags GdnBinaryFlags
116	if cmd.Guardian.Config != "" {
append result not assigned to the same slice
119	}
120
121	execCmd := exec.Command(cmd.Path, append(cmd.Args, args...)...)
122	execCmd.Env = append(env, cmd.Env...)123	execCmd.Stdin = cmd.Stdin
124	execCmd.Stdout = cmd.Stdout
125	execCmd.Stderr = cmd.Stderr
append result not assigned to the same slice
365		return nil, err
366	}
367
368	ioVolumeMounts := append(inputVolumeMounts, outputVolumeMounts...)369	ioVolumeMounts = append(ioVolumeMounts, cacheVolumeMounts...)
370
371	// if the working dir is already mounted, we can just re-use that volume.
append result not assigned to the same slice
244}
245
246func (worker *Worker) containerEnv(containerSpec runtime.ContainerSpec, fetchedImage FetchedImage) []string {
247	env := append(fetchedImage.Metadata.Env, containerSpec.Env...)248
249	if worker.dbWorker.HTTPProxyURL() != "" {
250		env = append(env, fmt.Sprintf("http_proxy=%s", worker.dbWorker.HTTPProxyURL()))
append result not assigned to the same slice
 41}
 42
 43func (writer *dbEventWriter) writeDangling(data []byte) []byte {
 44	text := append(writer.dangling, data...) 45
 46	checkEncoding, _ := utf8.DecodeLastRune(text)
 47	if checkEncoding == utf8.RuneError {