aws-solutions / video-on-demand-on-aws

An automated reference implementation leveraging AWS Step Functions and AWS Media Services to deploy a scalable fault tolerant Video on demand workflow
https://aws.amazon.com/solutions/video-on-demand-on-aws/
Apache License 2.0
502 stars 240 forks source link

spaces in directory name when executing build-s3-dist.sh #141

Closed thelinguist closed 1 year ago

thelinguist commented 2 years ago

Describe the bug When I run the build-s3-dist.sh script and I am executing the script in a directory whose parents have whitespace in the name, the script does not save the zip files in the expected directory format.

The issue is that the variables in the bash script are not properly checked for whitespace. This is at least the case for MacOS users using zsh or similar (default terminal).

Currently, I am seeing this output:

# ./build-s3-dist.sh solutions trademarked-solution-name v1.0.0

------------------------------------------------------------------------------
Rebuild distribution
------------------------------------------------------------------------------
------------------------------------------------------------------------------
CloudFormation Template
------------------------------------------------------------------------------
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

To Reproduce

  1. create a folder with whitespace mkdir AWS\ Template
  2. clone the repository into that folder cd AWS\ Template && git clone git@github.com:aws-solutions/video-on-demand-on-aws.git
  3. run the script cd video-on-demand-on-aws/deployment && ./build-s3-dist.sh solutions trademarked-solution-name v1.0.0

Expected behavior The script should not fail, even when the directory tree contains nodes with whitespaces. The regional-s3-assets folder should be created inside the repo root.

Please complete the following information about the solution:

Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context Add any other context about the problem here.

raulmlamzn commented 1 year ago

Thank you for your feedback. We've added this issue to our backlog for this solution and it will be fixed in the next release.

eggoynes commented 1 year ago

We have fixed in our latest release. Let us know if you have other questions. Thanks.

https://github.com/aws-solutions/video-on-demand-on-aws/releases/tag/v6.1.4