diff options
| author | 2023-04-28 01:36:55 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:55 +0800 | |
| commit | fc8c5fdce62fb229202659408798a7b6c98f6e8b (patch) | |
| tree | 7554f80e50de4af6fd255afa7c21bcdd58a7af34 /cli/internal/util/backends.go | |
| parent | dd84b9d64fb98746a230cd24233ff50a562c39c9 (diff) | |
| download | HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.tar.gz HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.zip | |
Diffstat (limited to 'cli/internal/util/backends.go')
| -rw-r--r-- | cli/internal/util/backends.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/cli/internal/util/backends.go b/cli/internal/util/backends.go deleted file mode 100644 index 66941ad..0000000 --- a/cli/internal/util/backends.go +++ /dev/null @@ -1,30 +0,0 @@ -package util - -import ( - "fmt" - "io/ioutil" - "path/filepath" - - "github.com/vercel/turbo/cli/internal/yaml" -) - -// YarnRC Represents contents of .yarnrc.yml -type YarnRC struct { - NodeLinker string `yaml:"nodeLinker"` -} - -// IsNMLinker Checks that Yarn is set to use the node-modules linker style -func IsNMLinker(cwd string) (bool, error) { - yarnRC := &YarnRC{} - - bytes, err := ioutil.ReadFile(filepath.Join(cwd, ".yarnrc.yml")) - if err != nil { - return false, fmt.Errorf(".yarnrc.yml: %w", err) - } - - if yaml.Unmarshal(bytes, yarnRC) != nil { - return false, fmt.Errorf(".yarnrc.yml: %w", err) - } - - return yarnRC.NodeLinker == "node-modules", nil -} |
