Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh committed Jan 19, 2025
1 parent 1cbf46a commit da5b663
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ components:
test15: !env USER

Check failure on line 60 in examples/quick-start-advanced/stacks/catalog/vpc/defaults.yaml

View workflow job for this annotation

GitHub Actions / [validate] quick-start-advanced

Unresolved tag: !env YAML.

Unresolved tag: !env
test20: !include https://raw.githubusercontent.com/cloudposse/atmos/refs/heads/main/examples/quick-start-advanced/stacks/catalog/vpc-flow-logs-bucket/defaults.yaml
test21: !include https://raw.githubusercontent.com/cloudposse/atmos/refs/heads/main/examples/quick-start-advanced/stacks/mixins/region/us-east-2.yaml .vars
test22: !include https://api.github.com/meta .api
11 changes: 6 additions & 5 deletions pkg/utils/yaml_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ func getValueWithTag(atmosConfig *schema.AtmosConfiguration, n *yaml.Node, file
}

// Detect relative paths (relative to the manifest file) and convert to absolute paths
if strings.HasPrefix(f, "./") || strings.HasPrefix(f, "../") {
resolved := ResolveRelativePath(f, file)
if !FileExists(resolved) {
return "", fmt.Errorf("the function '%s %s' points to a file that does not exist", tag, val)
resolved := ResolveRelativePath(f, file)
if FileExists(resolved) {
resolvedAbsolutePath, err := filepath.Abs(resolved)
if err != nil {
return "", fmt.Errorf("error converting the file path to an ansolute path in the function '%s %s': %v", tag, val, err)
}
return getNodeValue(tag, resolved, q), nil
return getNodeValue(tag, resolvedAbsolutePath, q), nil
}

// Check if the `!include` function points to an Atmos stack manifest relative to the `base_path` defined in `atmos.yaml`
Expand Down

0 comments on commit da5b663

Please sign in to comment.