| 1 |
// Copyright 2018 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
//go:build js && wasm |
| 6 |
|
| 7 |
package execpath |
| 8 |
|
| 9 |
// Look searches for an executable named file, using getenv to look up |
| 10 |
// environment variables. If getenv is nil, os.Getenv will be used. If file |
| 11 |
// contains a slash, it is tried directly and getenv will not be called. The |
| 12 |
// result may be an absolute path or a path relative to the current directory. |
| 13 |
func Look(file string, getenv func(string) string) (string, error) { |
| 14 |
// Wasm can not execute processes, so act as if there are no executables at all. |
| 15 |
return "", &Error{file, ErrNotFound} |
| 16 |
} |