mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			305 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			305 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // +build windows
 | |
| 
 | |
| package cobra
 | |
| 
 | |
| import (
 | |
| 	"os"
 | |
| 	"time"
 | |
| 
 | |
| 	"github.com/inconshreveable/mousetrap"
 | |
| )
 | |
| 
 | |
| var preExecHookFn = preExecHook
 | |
| 
 | |
| func preExecHook(c *Command) {
 | |
| 	if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
 | |
| 		c.Print(MousetrapHelpText)
 | |
| 		time.Sleep(5 * time.Second)
 | |
| 		os.Exit(1)
 | |
| 	}
 | |
| }
 |