瀏覽代碼

Merge pull request #13095 from Microsoft/10662-pkgrexec

Windows: reexec pkg supported
Alexander Morozov 10 年之前
父節點
當前提交
61cb6012e6
共有 2 個文件被更改,包括 15 次插入1 次删除
  1. 1 1
      pkg/reexec/command_unsupported.go
  2. 14 0
      pkg/reexec/command_windows.go

+ 1 - 1
pkg/reexec/command_unsupported.go

@@ -1,4 +1,4 @@
-// +build !linux
+// +build !linux,!windows
 
 package reexec
 

+ 14 - 0
pkg/reexec/command_windows.go

@@ -0,0 +1,14 @@
+// +build windows
+
+package reexec
+
+import (
+	"os/exec"
+)
+
+func Command(args ...string) *exec.Cmd {
+	return &exec.Cmd{
+		Path: Self(),
+		Args: args,
+	}
+}