Skip to content
New issue

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

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

Already on GitHub? # to your account

check if file command is installed #165

Merged
merged 1 commit into from
Dec 16, 2021
Merged

check if file command is installed #165

merged 1 commit into from
Dec 16, 2021

Conversation

tongueroo
Copy link
Contributor

This is a 🐞 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

When the file command is not installed, terraspace build doesn't work. This is because terraspace checks if files are text or binary files as part of processing them.

This PR provides a warning to the user to install the file command. It also allows terraspace build to continue working and defaults to assuming that all files are text files, not binary.

Context

How to Test

sudo mv /usr/bin/file{.bak,}
cd terraspace-project-folder
terrasapce build demo

Confirm there's a warning:

$ terraspace build demo
WARN: The command 'file' is not installed.
Unable to check if files are text or binary files as a part of the Terraspace compile processing.
Assuming all files are not binary file.

Please install the file command to remove this warning message.
Building .terraspace-cache/us-west-2/dev/stacks/demo
Built in .terraspace-cache/us-west-2/dev/stacks/demo
$

Version Changes

Patch

@tongueroo tongueroo merged commit 89ff202 into master Dec 16, 2021
@tongueroo tongueroo deleted the file-command branch December 16, 2021 15:17
@tongueroo tongueroo mentioned this pull request Dec 16, 2021
3 tasks
@tongueroo
Copy link
Contributor Author

Released in 0.6.22

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant