mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
d5a49363d7
Using url.Parse to parse an absolute file path on Windows yields a URL type where the Path element is prefixed by a slash. For example, parsing "file:///C:/Users/user" gives a URL type with Path:"/C:/Users/user". According to golang.org/issue/6027, the parsing is correct as is. The leading slash on the Path must be eliminated before any file operations. This commit introduces a urlParse function which wraps the url.Parse functionality and removes the leading slash in Path for absolute file paths on Windows. Fixes config/module test failures on Windows. |
||
---|---|---|
.. | ||
lang | ||
module | ||
test-fixtures | ||
append_test.go | ||
append.go | ||
config_string.go | ||
config_test.go | ||
config_tree.go | ||
config.go | ||
import_tree.go | ||
interpolate_funcs_test.go | ||
interpolate_funcs.go | ||
interpolate_test.go | ||
interpolate_walk_test.go | ||
interpolate_walk.go | ||
interpolate.go | ||
lang.go | ||
loader_hcl_test.go | ||
loader_hcl.go | ||
loader_test.go | ||
loader.go | ||
merge_test.go | ||
merge.go | ||
raw_config_test.go | ||
raw_config.go |