Change signature of "exec" and "fg" on Windows to match that on Unix.

This fixes #1195.
This commit is contained in:
Qi Xiao 2020-12-26 22:59:18 +00:00
parent 3e29266ee0
commit 3615988408
2 changed files with 7 additions and 7 deletions

View File

@ -27,7 +27,8 @@ var ErrNotInSameProcessGroup = errors.New("not in the same process group")
// Replace the Elvish process with an external `$command`, defaulting to
// `elvish`. This decrements `$E:SHLVL` before starting the new process.
//
// This command always raises an exception on Windows.
// This command always raises an exception on Windows with the message "not
// supported on Windows".
func execFn(fm *Frame, args ...interface{}) error {
var argstrings []string

View File

@ -2,13 +2,12 @@ package eval
import "errors"
var (
execFn = notSupportedOnWindows
fg = notSupportedOnWindows
)
var errNotSupportedOnWindows = errors.New("not supported on Windows")
func notSupportedOnWindows() error {
func execFn(...interface{}) error {
return errNotSupportedOnWindows
}
func fg(...int) error {
return errNotSupportedOnWindows
}