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

source_hash doesn't work with cache_dir #87

Open
phillip-peach opened this issue Jul 26, 2017 · 0 comments
Open

source_hash doesn't work with cache_dir #87

phillip-peach opened this issue Jul 26, 2017 · 0 comments

Comments

@phillip-peach
Copy link

If you use cache_dir and the command generated to check the source_hash incorrectly tries to check it in the final destination before it is moved.

Since cache_dir is needed to work around #81 these two issues together mean you can't check the hash if mode needs to be changed to anything other than 0644.

Example Manifest snippet
wget::fetch { '/usr/local/bin/ecs-cli': destination => '/usr/local/bin/ecs-cli', cache_dir => '/tmp', mode => '0755', source => 'https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-v0.6.1', # # SEE: https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-v0.6.1.md5 # source_hash => 'c26236bdde9ad5df013d60137da0a239', }
Results in the following error, you can see the command incorrectly checking the final destination
Error: wget --no-verbose -N -P "/tmp" "https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-v0.6.1" && echo 'c26236bdde9ad5df013d60137da0a239 /usr/local/bin/ecs-cli' | md5sum -c --quiet returned 1 instead of one of [0] Error: /Stage[main]/Aws::Ecscli/Wget::Fetch[/usr/local/bin/ecs-cli]/Exec[wget-/usr/local/bin/ecs-cli]/returns: change from notrun to 0 failed: wget --no-verbose -N -P "/tmp" "https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-v0.6.1" && echo 'c26236bdde9ad5df013d60137da0a239 /usr/local/bin/ecs-cli' | md5sum -c --quiet returned 1 instead of one of [0]

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

No branches or pull requests

1 participant