mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-21 10:47:34 -05:00
This test uses a temporary file as an overridden CLI configuration to force using a specific plugin cache directory, but temporary file paths contain backslashes on Windows and the CLI configuration syntax is HCL so would require backslashes to be escaped. Since Windows will accept forward-slash paths as a supported variation, and we typically recommend that folks write paths that way in HCL for portability anyway, this uses filepath.ToSlash to force consistent use of slashes on all platforms. It would also have been reasonable to use a %q format verb to use Go's string quoting syntax, but that's not the way we typically recommend folks hand-write their CLI configurations and so this way is just-so-slightly more "realistic". Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
4.3 KiB
4.3 KiB