Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for isTerminal (0.14 sec)

  1. platforms/core-runtime/native/src/test/groovy/org/gradle/internal/nativeintegration/console/NativePlatformConsoleDetectorTest.groovy

            given:
            terminals.isTerminal(Terminals.Output.Stdout) >> false
            terminals.isTerminal(Terminals.Output.Stderr) >> false
    
            expect:
            detector.console == null
        }
    
        @Requires(UnitTestPreconditions.SmartTerminalAvailable)
        def "returns metadata when stdout and stderr are attached to console"() {
            given:
            terminals.isTerminal(Terminals.Output.Stdout) >> true
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:06:40 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  2. internal/color/color.go

    	// ansi coloring on dumb terminals.
    	IsTerminal = func() bool {
    		return !color.NoColor
    	}
    
    	Bold = func() func(format string, a ...interface{}) string {
    		if IsTerminal() {
    			return color.New(color.Bold).SprintfFunc()
    		}
    		return fmt.Sprintf
    	}()
    
    	RedBold = func() func(a ...interface{}) string {
    		if IsTerminal() {
    			return color.New(color.FgRed, color.Bold).SprintFunc()
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 17:57:52 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. internal/logger/utils.go

    	if runtime.GOOS == "windows" {
    		return
    	}
    	if color.IsTerminal() {
    		ansiEscape("[%dC", n)
    	}
    }
    
    func ansiSaveAttributes() {
    	if runtime.GOOS == "windows" {
    		return
    	}
    	if color.IsTerminal() {
    		ansiEscape("7")
    	}
    }
    
    func ansiRestoreAttributes() {
    	if runtime.GOOS == "windows" {
    		return
    	}
    	if color.IsTerminal() {
    		ansiEscape("8")
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 04 23:10:08 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/term/term.go

    // Note that on non-Unix systems os.Stdin.Fd() may not be 0.
    package term
    
    // State contains the state of a terminal.
    type State struct {
    	state
    }
    
    // IsTerminal returns whether the given file descriptor is a terminal.
    func IsTerminal(fd int) bool {
    	return isTerminal(fd)
    }
    
    // MakeRaw puts the terminal connected to the given file descriptor into raw
    // mode and returns the previous state of the terminal so that it can be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 22:24:28 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/pkg/printers/terminal.go

    // non-reversible) format.
    func EscapeTerminal(in string) string {
    	return terminalEscaper.Replace(in)
    }
    
    // IsTerminal returns whether the passed object is a terminal or not
    func IsTerminal(i interface{}) bool {
    	_, terminal := term.GetFdInfo(i)
    	return terminal
    }
    
    // AllowsColorOutput returns true if the specified writer is a terminal and
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 11 15:04:11 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. src/cmd/pprof/readlineui.go

    	var colorResetEscape = "\033[0m"
    	return colorEscape + msg + colorResetEscape
    }
    
    // IsTerminal reports whether the UI is known to be tied to an
    // interactive terminal (as opposed to being redirected to a file).
    func (r *readlineUI) IsTerminal() bool {
    	const stdout = 1
    	return term.IsTerminal(stdout)
    }
    
    // WantBrowser indicates whether browser should be opened with the -http option.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 30 18:10:36 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  7. platforms/core-runtime/native/src/main/java/org/gradle/internal/nativeintegration/console/NativePlatformConsoleDetector.java

            if ((term != null && term.equals("dumb")) || (OperatingSystem.current().isUnix() && term == null)) {
                return null;
            }
    
            boolean stdout = terminals.isTerminal(Stdout);
            boolean stderr = terminals.isTerminal(Stderr);
    
            try {
                if (stdout) {
                    return new NativePlatformConsoleMetaData(stdout, stderr, terminals.getTerminal(Stdout));
                } else if (stderr) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:06:40 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  8. pkg/kubelet/runonce.go

    }
    
    // runPod runs a single pod and waits until all containers are running.
    func (kl *Kubelet) runPod(ctx context.Context, pod *v1.Pod, retryDelay time.Duration) error {
    	var isTerminal bool
    	delay := retryDelay
    	retry := 0
    	for !isTerminal {
    		status, err := kl.containerRuntime.GetPodStatus(ctx, pod.UID, pod.Name, pod.Namespace)
    		if err != nil {
    			return fmt.Errorf("unable to get status for pod %q: %v", format.Pod(pod), err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 04 06:56:50 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  9. cmd/preferredimports/preferredimports.go

    	regex         = flag.String("include-path", "(test/e2e/|test/e2e_node)", "only files with paths matching this regex is touched")
    	isTerminal    = term.IsTerminal(int(os.Stdout.Fd()))
    	logPrefix     = ""
    	aliases       = map[*regexp.Regexp]string{}
    )
    
    type analyzer struct {
    	fset      *token.FileSet // positions are relative to fset
    	ctx       build.Context
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:44 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  10. src/cmd/go/terminal_test.go

    	}
    	return buf[0] == '1', buf[1] == '2'
    }
    
    func init() {
    	if os.Getenv("GO_TEST_TERMINAL_PASSTHROUGH") == "" {
    		return
    	}
    
    	if term.IsTerminal(1) {
    		os.Stdout.WriteString("1")
    	} else {
    		os.Stdout.WriteString("X")
    	}
    	if term.IsTerminal(2) {
    		os.Stdout.WriteString("2")
    	} else {
    		os.Stdout.WriteString("X")
    	}
    
    	// Before exiting, wait for the parent process to read the PTY output,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 18:18:50 UTC 2022
    - 3.3K bytes
    - Viewed (0)
Back to top