mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add condition for conversion of module path in manifest
This commit is contained in:
parent
8bc0ef8fdc
commit
98e612ee50
@ -81,6 +81,13 @@ func ReadManifestSnapshot(r io.Reader) (Manifest, error) {
|
||||
return nil, fmt.Errorf("invalid version %q for %s: %s", record.VersionStr, record.Key, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure Windows is using the proper modules directory format after
|
||||
// reading the modules manifest
|
||||
if string(filepath.Separator) != "/" {
|
||||
record.Dir = filepath.FromSlash(record.Dir)
|
||||
}
|
||||
|
||||
if _, exists := new[record.Key]; exists {
|
||||
// This should never happen in any valid file, so we'll catch it
|
||||
// and report it to avoid confusing/undefined behavior if the
|
||||
|
Loading…
Reference in New Issue
Block a user