diff --git a/codebuild_specs/scripts-windows/shared-scripts-windows.sh b/codebuild_specs/scripts-windows/shared-scripts-windows.sh index 664d4efc1cb..43dab9158ff 100644 --- a/codebuild_specs/scripts-windows/shared-scripts-windows.sh +++ b/codebuild_specs/scripts-windows/shared-scripts-windows.sh @@ -17,10 +17,7 @@ function storeCache { s3Path="s3://$CACHE_BUCKET_NAME/$CODEBUILD_SOURCE_VERSION/$alias" echo writing cache to $s3Path # zip contents and upload to s3 - # if ! (cd $localPath && tar -czf cache.tar . && ls && aws s3 cp cache.tar $s3Path); then - # echo Something went wrong storing the cache. - # fi - if ! (cd $localPath && tar -czf cache.tar . && ls && aws s3 cp cache.tar $s3Path); then + if ! (cd $localPath && tar cz . | aws s3 cp - $s3Path); then echo Something went wrong storing the cache. fi echo done writing cache