summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/collect.go5
-rw-r--r--modules/config.go1
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/collect.go b/modules/collect.go
index 52d75af59..026373b54 100644
--- a/modules/collect.go
+++ b/modules/collect.go
@@ -354,6 +354,11 @@ func (c *collector) addAndRecurse(owner *moduleAdapter, disabled bool) error {
}
func (c *collector) applyMounts(moduleImport Import, mod *moduleAdapter) error {
+ if moduleImport.NoMounts {
+ mod.mounts = nil
+ return nil
+ }
+
mounts := moduleImport.Mounts
modConfig := mod.Config()
diff --git a/modules/config.go b/modules/config.go
index 1e3e3c798..45a2f22ee 100644
--- a/modules/config.go
+++ b/modules/config.go
@@ -367,6 +367,7 @@ type Import struct {
pathProjectReplaced bool // Set when Path is replaced in project config.
IgnoreConfig bool // Ignore any config in config.toml (will still folow imports).
IgnoreImports bool // Do not follow any configured imports.
+ NoMounts bool // Do not mount any folder in this import.
NoVendor bool // Never vendor this import (only allowed in main project).
Disable bool // Turn off this module.
Mounts []Mount