mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
f001cb8654
Since our new approach here works by installing with a synthetic module configuration block, we need to treat relative paths as a special case for two reasons: - Relative paths in module addresses are relative to the file containing the call rather than the working directory, but -from-module uses the working directory (and the call is in a synthetic "file" anyway) - We need to force Terraform to pass the path through to go-getter rather than just treating it as a relative reference, since we really do want a copy of the directory in this case, even if it is local. To address both of these things, we'll detect a relative path and turn it into an absolute path before beginning installation. This is a bit hacky, but this is consistent with the general philosophy of the -from-module implementation where it does hacky things so that the rest of the installer code can be spared of dealing with its special cases. This is covered by a couple of existing tests that run init -from-module, including TestInit_fromModule_dstInSrc which now passes. |
||
---|---|---|
.. | ||
test-fixtures | ||
copy_dir.go | ||
doc.go | ||
getter.go | ||
inode_freebsd.go | ||
inode_windows.go | ||
inode.go | ||
loader_init_from_module_test.go | ||
loader_init_from_module.go | ||
loader_install_hooks.go | ||
loader_install_test.go | ||
loader_install.go | ||
loader_load_test.go | ||
loader_load.go | ||
loader_snapshot_test.go | ||
loader_snapshot.go | ||
loader_test.go | ||
loader.go | ||
module_manifest.go | ||
module_mgr.go | ||
source_addr.go | ||
testing.go |