Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for tempEnvName (0.47 sec)

  1. src/cmd/go/internal/vcweb/script.go

    	case "windows":
    		return "USERPROFILE"
    	case "plan9":
    		return "home"
    	default:
    		return "HOME"
    	}
    }
    
    // tempEnvName returns the environment variable used by os.TempDir
    // to locate the default directory for temporary files.
    func tempEnvName() string {
    	switch runtime.GOOS {
    	case "windows":
    		return "TMP"
    	case "plan9":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 08 19:37:03 UTC 2022
    - 9K bytes
    - Viewed (0)
  2. src/cmd/go/go_unix_test.go

    	// with a signal they might fail to clean up some temp files, and we don't
    	// want that to cause an "unexpected files" failure at the end of the run.
    	cmd.Env = append(slices.Clip(tg.env), tempEnvName()+"="+t.TempDir())
    
    	cmd.SysProcAttr = &syscall.SysProcAttr{
    		Setpgid: true,
    	}
    	cmd.Cancel = func() error {
    		pgid := cmd.Process.Pid
    		return syscall.Kill(-pgid, syscall.SIGINT)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 16:17:55 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  3. src/cmd/go/script_test.go

    	must(os.MkdirAll(telemetryDir, 0777))
    	must(s.Setenv("TEST_TELEMETRY_DIR", filepath.Join(work, "telemetry")))
    
    	must(os.MkdirAll(filepath.Join(work, "tmp"), 0777))
    	must(s.Setenv(tempEnvName(), filepath.Join(work, "tmp")))
    
    	gopath := filepath.Join(work, "gopath")
    	must(s.Setenv("GOPATH", gopath))
    	gopathSrc := filepath.Join(gopath, "src")
    	must(os.MkdirAll(gopathSrc, 0777))
    	must(s.Chdir(gopathSrc))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. src/cmd/go/go_test.go

    	if err != nil {
    		log.Fatal(err)
    	}
    	if !*testWork {
    		defer removeAll(topTmpdir)
    	} else {
    		fmt.Fprintf(os.Stderr, "TESTWORK: preserving top level tempdir %s\n", topTmpdir)
    	}
    	os.Setenv(tempEnvName(), topTmpdir)
    
    	dir, err := os.MkdirTemp(topTmpdir, "tmpdir")
    	if err != nil {
    		log.Fatal(err)
    	}
    	testTmpDir = dir
    	if !*testWork {
    		defer removeAll(testTmpDir)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
Back to top