github.com/rogpeppe/go-internal@v1.12.1-0.20240509064211-c8567cf8e95f/internal/os/execpath/lp_js.go (about) 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 }