You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Stat upfront so a non-directory dep path (e.g. another-name.hcl) is preserved instead of being passed to the parser, which would reject it as ENOTDIR. The duplication of work is intentional.
294
295
info, statErr:=fs.Stat(depPath)
295
296
// Real I/O errors (permission denied, etc.) must surface so a malformed DAG isn't silently produced; only ENOENT is treated as "keep the raw path".
// Dependency paths can also point at non-default-named config files (e.g. another-name.hcl), which the stack-file parser would otherwise reject as "not a directory".
Copy file name to clipboardExpand all lines: internal/hclparse/parse_test.go
+40Lines changed: 40 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -878,6 +878,46 @@ unit "vpc" {
878
878
assert.Contains(t, err.Error(), "must not define nested includes")
879
879
}
880
880
881
+
// Locks the per-file SourceBytes invariant: when a unit's autoinclude block lives in an included stack file, GenerateAutoIncludeFile must use the included file's bytes (not the root's) to slice expression text.
// ParseStackFileFromPath calls util.ResolvePath, which on macOS resolves /tmp -> /private/tmp; resolve our side too before comparing.
359
+
// On macOS, t.TempDir() returns paths under /var/folders/... where /var is a symlink to /private/var; util.ResolvePath follows it, so resolve our side too before comparing.
0 commit comments