Skip to content

Commit e681a11

Browse files
authored
Merge pull request #2 from arduino/fix_args
Fixed arguments passing.
2 parents f96c9fc + 5027114 commit e681a11

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

runas.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package runas
33
import (
44
"errors"
55
"fmt"
6-
"os"
76
"strings"
87
"time"
98
"unsafe"
@@ -116,7 +115,7 @@ func RunElevated(executable, workingDir string, args []string, awaitProcCompleti
116115
if directory, err = windows.UTF16PtrFromString(workingDir); err != nil {
117116
return 0, err
118117
}
119-
if parameters, err = windows.UTF16PtrFromString(strings.Join(os.Args[1:], " ")); err != nil {
118+
if parameters, err = windows.UTF16PtrFromString(strings.Join(args, " ")); err != nil {
120119
return 0, err
121120
}
122121

0 commit comments

Comments
 (0)