mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-21 18:42:36 +00:00
cmd/tsconnect: pin yarn and node
Adds a tool/yarn helper script that uses specific versions of yarn and node, downloading them if necessary. Modeled after tool/go (and the yarn and node Redo scripts from the corp repo). Also allows the path to yarn to be overidden (in case the user does not want to use this script) and always pipes yarn output (to make debugging and viewing of process easier). Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:

committed by
Mihai Parparita

parent
92357a54ec
commit
be8a0859a9
@@ -97,11 +97,10 @@ func buildWasm(dev bool) error {
|
||||
// installJSDeps installs the JavaScript dependencies specified by package.json
|
||||
func installJSDeps() error {
|
||||
log.Printf("Installing JS deps...\n")
|
||||
stdoutStderr, err := exec.Command("yarn").CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("yarn failed: %s", stdoutStderr)
|
||||
}
|
||||
return err
|
||||
cmd := exec.Command(*yarnPath)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
// EsbuildMetadata is the subset of metadata struct (described by
|
||||
|
Reference in New Issue
Block a user