MCPcopy
hub / github.com/spicetify/cli / nodeModuleSymlink

Function nodeModuleSymlink

src/cmd/apply.go:396–412  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394}
395
396func nodeModuleSymlink() {
397 nodeModulePath, err := utils.GetExtensionPath("node_modules")
398 if err != nil {
399 return
400 }
401
402 spinner, _ := utils.Spinner.Start("Creating node_modules symlink")
403
404 nodeModuleDest := filepath.Join(appDestPath, "xpui", "extensions", "node_modules")
405 if err = utils.CreateJunction(nodeModulePath, nodeModuleDest); err != nil {
406 spinner.Fail("Failed to create node_modules symlink")
407 utils.PrintError(err.Error())
408 return
409 }
410
411 spinner.Success("Created node_modules symlink")
412}

Callers 1

ApplyFunction · 0.85

Calls 3

GetExtensionPathFunction · 0.92
CreateJunctionFunction · 0.92
PrintErrorFunction · 0.92

Tested by

no test coverage detected