Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudformation package command must resolve relative file paths when processing AWS::Include transform #4083

Merged
merged 1 commit into from
Apr 19, 2019

Conversation

sanathkr
Copy link
Contributor

Issue #, if available:
aws/aws-sam-cli#654

Description of changes:
aws cloudformation package has the behavior where it resolves relative file paths with respect to the folder where the template is present. But for the AWS::Include transform which was recently added (#3454), did not follow this pattern. As the result, it was resolving relative paths with respect to the os.cwd() which is where the AWS CLI is invoked from.

This PR fixes the issue. It also raises an explicit exception when the local file could not be read, so users get an immediate feedback loop when either their path is invalid or the file could not be found. This is also a pattern followed when packaging other resources.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-io
Copy link

codecov-io commented Apr 17, 2019

Codecov Report

Merging #4083 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4083      +/-   ##
===========================================
+ Coverage    94.46%   94.46%   +<.01%     
===========================================
  Files          187      187              
  Lines        14114    14118       +4     
===========================================
+ Hits         13333    13337       +4     
  Misses         781      781
Impacted Files Coverage Δ
...customizations/cloudformation/artifact_exporter.py 98.57% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44769d9...64151f9. Read the comment docs.

@joguSD joguSD merged commit 7924756 into aws:develop Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants