MCPcopy Index your code
hub / github.com/dagger/dagger / localModuleErrorf

Function localModuleErrorf

cmd/dagger/module.go:1242–1255  ·  view source on GitHub ↗
(format string, err error)

Source from the content-addressed store, hash-verified

1240}
1241
1242func localModuleErrorf(format string, err error) error {
1243 if err == nil {
1244 return nil
1245 }
1246
1247 wrapped := fmt.Errorf(format, err)
1248 if moduleURL != "" {
1249 return fmt.Errorf("%w\nhint: module source came from --mod=%q; if you intended local, pass `--mod .`", wrapped, moduleURL)
1250 }
1251 if envRef, ok := os.LookupEnv("DAGGER_MODULE"); ok {
1252 return fmt.Errorf("%w\nhint: module source came from DAGGER_MODULE=%q; if you intended local, pass `--mod .`", wrapped, envRef)
1253 }
1254 return wrapped
1255}
1256
1257// Wraps a command with optional module loading. If a module was explicitly specified by the user,
1258// it will try to load it and error out if it's not found or invalid. If no module was specified,

Callers 4

module.goFile · 0.85
loadToolchainInfoFunction · 0.85
modifyLocalModuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected